コード例 #1
0
 def on_deleted(this, event):
     path = event.src_path
     logger.debug("Handling %s" % event)
     if utils.normalize_local_suffix(path) == root_path:
         self.settings.set_localfs_enabled(False)
         msg = messaging.LocalfsSyncDisabled(logger=logger)
         self.settings.messager.put(msg)
         return
     handle_path(path, rec=utils.iswin())
コード例 #2
0
ファイル: localfs_client.py プロジェクト: pombredanne/agkyra
 def on_deleted(this, event):
     path = event.src_path
     logger.debug("Handling %s" % event)
     if utils.normalize_local_suffix(path) == root_path:
         self.settings.set_localfs_enabled(False)
         msg = messaging.LocalfsSyncDisabled(logger=logger)
         self.settings.messager.put(msg)
         return
     handle_path(path, rec=utils.iswin())
コード例 #3
0
ファイル: setup.py プロジェクト: jaeko44/agkyra
 def create_local_dirs(self):
     self.create_dir(self.local_root_path)
     self.create_dir(self.cache_path)
     if utils.iswin():
         win_hide_file(self.cache_path)
     self.create_dir(self.cache_hide_path)
     self.create_dir(self.cache_stage_path)
     self.create_dir(self.cache_fetch_path)
     self.set_mtime_lag()
     self.set_case_insensitive()
コード例 #4
0
ファイル: setup.py プロジェクト: jaeko44/agkyra
 def create_local_dirs(self):
     self.create_dir(self.local_root_path)
     self.create_dir(self.cache_path)
     if utils.iswin():
         win_hide_file(self.cache_path)
     self.create_dir(self.cache_hide_path)
     self.create_dir(self.cache_stage_path)
     self.create_dir(self.cache_fetch_path)
     self.set_mtime_lag()
     self.set_case_insensitive()
コード例 #5
0
ファイル: localfs_client.py プロジェクト: pombredanne/agkyra
def link_file(src, dest):
    cmd = os.rename if utils.iswin() else os.link
    try:
        cmd(src, dest)
    except OSError as e:
        if e.errno == errno.EEXIST:
            raise common.ConflictError("Cannot link, '%s' exists." % dest)
        if e.errno in [errno.ENOTDIR, errno.EINVAL]:
            raise common.ConflictError("Cannot link, missing path for '%s'." % dest)
        if e.errno == errno.ENOENT:
            raise DirMissing()
コード例 #6
0
def link_file(src, dest):
    cmd = os.rename if utils.iswin() else os.link
    try:
        cmd(src, dest)
    except OSError as e:
        if e.errno == errno.EEXIST:
            raise common.ConflictError("Cannot link, '%s' exists." % dest)
        if e.errno in [errno.ENOTDIR, errno.EINVAL]:
            raise common.ConflictError("Cannot link, missing path for '%s'." %
                                       dest)
        if e.errno == errno.ENOENT:
            raise DirMissing()
コード例 #7
0
def launch_server(callback, debug):
    """Launch the server in a separate process"""
    LOGGER.info('Start SessionHelper session')
    opts = ["start", "daemon"]
    if debug:
        opts.append('-d')
    if utils.iswin():
        command = [] if ISFROZEN else ["pythonw.exe"]
        command.append(callback)
        command += opts
        subprocess.Popen(command, close_fds=True)
    else:
        command = [callback, callback]
        command += opts
        daemonize(command)
コード例 #8
0
ファイル: protocol.py プロジェクト: jaeko44/agkyra
def launch_server(callback, debug):
    """Launch the server in a separate process"""
    LOGGER.info('Start SessionHelper session')
    opts = ["start", "daemon"]
    if debug:
        opts.append('-d')
    if utils.iswin():
        command = [] if ISFROZEN else ["pythonw.exe"]
        command.append(callback)
        command += opts
        subprocess.Popen(command, close_fds=True)
    else:
        command = [callback, callback]
        command += opts
        daemonize(command)