🎨 Update av export

This commit is contained in:
Daniel 2023-09-25 22:23:04 +08:00
parent 82c946ab4d
commit 707e9e03cc
No known key found for this signature in database
GPG key ID: 86211BA83DF03017

View file

@ -187,6 +187,16 @@ func ImportSY(zipPath, boxID, toPath string) (err error) {
})
}
// 将关联的数据库文件移动到 data/storage/av/ 下
storageAvDir := filepath.Join(unzipRootPath, "storage", "av")
if gulu.File.IsExist(storageAvDir) {
targetStorageAvDir := filepath.Join(util.DataDir, "storage", "av")
if copyErr := filelock.Copy(storageAvDir, targetStorageAvDir); nil != copyErr {
logging.LogErrorf("copy storage av dir from [%s] to [%s] failed: %s", storageAvDir, targetStorageAvDir, copyErr)
}
}
// 写回 .sy
for _, tree := range trees {
syPath := filepath.Join(unzipRootPath, tree.Path)