pinokiod 0.1.24 → 0.1.25
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/server/index.js +17 -13
- package/server/public/electron.css +1 -1
package/package.json
CHANGED
package/server/index.js
CHANGED
|
@@ -1299,8 +1299,8 @@ class Server {
|
|
|
1299
1299
|
if (this.kernel.platform === "win32") {
|
|
1300
1300
|
// robocoyp returns 1 when successful
|
|
1301
1301
|
//mv_cmd = `start /wait (robocopy ${existing_home} ${new_home} /E /MOVE /NFL /NDL) ^& IF %ERRORLEVEL% LEQ 1 exit 0`
|
|
1302
|
-
|
|
1303
|
-
mv_cmd = `start /wait robocopy ${existing_home} ${new_home} /E /MOVE /NFL`
|
|
1302
|
+
mv_cmd = `start /wait robocopy ${existing_home} ${new_home} /E /MOVE /NFL /NDL`
|
|
1303
|
+
//mv_cmd = `start /wait robocopy ${existing_home} ${new_home} /E /MOVE /NFL`
|
|
1304
1304
|
} else {
|
|
1305
1305
|
mv_cmd = `mv ${existing_home} ${new_home}`
|
|
1306
1306
|
}
|
|
@@ -1335,21 +1335,25 @@ class Server {
|
|
|
1335
1335
|
// 2. Handle HOME
|
|
1336
1336
|
if (config.home) {
|
|
1337
1337
|
// set "new_home"
|
|
1338
|
-
const basename = path.basename(config.home)
|
|
1339
1338
|
|
|
1340
|
-
//
|
|
1341
|
-
|
|
1342
|
-
|
|
1339
|
+
// if the home is different from the existing home, go forward
|
|
1340
|
+
if (config.home !== home) {
|
|
1341
|
+
const basename = path.basename(config.home)
|
|
1342
|
+
// check for invalid path
|
|
1343
|
+
let isValidPath = (basename !== '' && basename !== config.home)
|
|
1344
|
+
if (!isValidPath) {
|
|
1345
|
+
throw new Error("Invalid path: " + config.home)
|
|
1346
|
+
}
|
|
1347
|
+
|
|
1348
|
+
// check if the destination already exists => throw error
|
|
1349
|
+
let exists = await fse.pathExists(config.home)
|
|
1350
|
+
if (exists) {
|
|
1351
|
+
throw new Error(`The path ${config.home} already exists. Please remove the folder and retry`)
|
|
1352
|
+
}
|
|
1353
|
+
|
|
1343
1354
|
this.kernel.store.set("new_home", config.home)
|
|
1344
|
-
} else {
|
|
1345
|
-
throw new Error("Invalid path: " + config.home)
|
|
1346
1355
|
}
|
|
1347
1356
|
|
|
1348
|
-
// check if the destination already exists => throw error
|
|
1349
|
-
let exists = await fse.pathExists(config.home)
|
|
1350
|
-
if (exists) {
|
|
1351
|
-
throw new Error(`The path ${config.home} already exists. Please remove the folder and retry`)
|
|
1352
|
-
}
|
|
1353
1357
|
}
|
|
1354
1358
|
|
|
1355
1359
|
home = this.kernel.store.get("home")
|