core: fix move file error

This commit is contained in:
undefined committed 2021-12-02 22:56:47 +08:00
1 parent 32f34ba187
commit 6e79703dce
2 files changed
+2 -2

No files matched your search

+1 -1
View File
@@ -118,7 +118,7 @@ if (argv.args[0] === 'restore') {
exec('mongorestore', [`--uri=${url}`, `--dir=${dir}/dump/${JSON.parse(dbConfig).name}`, '--drop'], { stdio: 'inherit' });
if (fs.existsSync(`${dir}/file`)) {
exec('rm', ['-rf', '/data/file/*'], { stdio: 'inherit' });
exec('mv', [`${dir}/file/*`, '/data/file'], { stdio: 'inherit' });
exec('bash', ['-c', `mv ${dir}/file/* /data/file`], { stdio: 'inherit' });
}
if (fs.existsSync(`${dir}/env`)) {
fs.copySync(`${dir}/env`, `${os.homedir()}/.hydro/env`, { overwrite: true });
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "hydrooj",
"version": "3.2.4",
"version": "3.2.5",
"bin": "bin/hydrooj.js",
"main": "src/loader",
"module": "src/loader",