mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 01:38:19 +08:00
core: fix incremental backup
This commit is contained in:
1 file changed
+1
-1
@@ -71,7 +71,7 @@ export function register(cli: CAC) {
|
|||||||
if (cwd === '/data') return;
|
if (cwd === '/data') return;
|
||||||
if (keepSource) fs.copySync(path.join(cwd, item), path.join('/data', item), { overwrite: true });
|
if (keepSource) fs.copySync(path.join(cwd, item), path.join('/data', item), { overwrite: true });
|
||||||
else fs.moveSync(path.join(cwd, item), path.join('/data', item), { overwrite: true });
|
else fs.moveSync(path.join(cwd, item), path.join('/data', item), { overwrite: true });
|
||||||
filesToRemove.push(path.join(cwd, item));
|
filesToRemove.push(path.join('/data', item));
|
||||||
}
|
}
|
||||||
: (cwd: string, item: string, keepSource = true) => {
|
: (cwd: string, item: string, keepSource = true) => {
|
||||||
exec('zip', ['-gr', target, item], { cwd, stdio: 'inherit' });
|
exec('zip', ['-gr', target, item], { cwd, stdio: 'inherit' });
|
||||||
|
|||||||
Reference in new issue
Block a user