def set_windows_folder_id(self, node_id, path):
     if os.name in ("nt", "ce"):
         logging.debug("Created folder %s with node id %i" % (path, node_id))
         try:
             with open(path + "\\.pydio_id", "w") as hidden:
                 hidden.write("%i" % (node_id,))
                 hidden.close()
                 set_file_hidden(path + "\\.pydio_id")
         except Exception as e:
             logging.error("Error while trying to save hidden file .pydio_id")
Beispiel #2
0
 def set_windows_folder_id(self, node_id, path):
     if os.name in ("nt", "ce"):
         logging.debug("Created folder %s with node id %i" % (path, node_id))
         try:
             self.clear_windows_folder_id(path)
             with open(path + "\\.pydio_id", "w") as hidden:
                 hidden.write("%s:%i" % (self.unique_id, node_id,))
                 hidden.close()
                 set_file_hidden(path + "\\.pydio_id")
         except Exception as e:
             logging.error("Error while trying to save hidden file .pydio_id : %s" % e.message)