打开/www/server/panel/plugin/psync_api/psync_api_main.py
def send(self,spath,dpath,force = False): if not os.path.isdir(spath): return self._API.upload_file(spath,dpath,True) # 创建目录 self._API.send_panel('/files?action=CreateDir',{"path":dpath}) # 👇 跳过网站文件传输,只迁移配置 skip_dirs = ['/www/', '/www1/', '/pic/'] if any(spath.startswith(p) for p in skip_dirs): write_log(f"|-跳过网站目录的文件迁移:{spath}") return True # 是否压缩目录后上传 if self._SYNC_INFO['zip'] and not force: ... 排除的目录可以自己编写