fix(autobackup): cookies folder backup failed

This commit is contained in:
DDSRem
2024-11-03 11:13:24 +08:00
parent 0cbb13408a
commit 16fe1f85bf
2 changed files with 4 additions and 3 deletions

View File

@@ -366,11 +366,12 @@
"name": "自动备份",
"description": "自动备份数据和配置文件。",
"labels": "系统设置",
"version": "2.0",
"version": "2.0.1",
"icon": "Time_machine_B.png",
"author": "thsrite",
"level": 1,
"history": {
"v2.0.1": "修复cookies文件夹备份失败",
"v2.0": "支持备份app.env及cookies,支持自定义保存路径",
"v1.3": "去除已废弃的环境变量引用",
"v1.2": "增强API安全性"

View File

@@ -25,7 +25,7 @@ class AutoBackup(_PluginBase):
# 插件图标
plugin_icon = "Time_machine_B.png"
# 插件版本
plugin_version = "2.0"
plugin_version = "2.0.1"
# 插件作者
plugin_author = "thsrite"
# 作者主页
@@ -169,7 +169,7 @@ class AutoBackup(_PluginBase):
shutil.copy(app_file, backup_path)
cookies_path = config_path / "cookies"
if cookies_path.exists():
shutil.copytree(cookies_path, backup_path)
shutil.copytree(cookies_path, f'{backup_path}/cookies')
zip_file = str(backup_path) + '.zip'
if os.path.exists(zip_file):