Skip to content

Commit 13ad4f1

Browse files
fix
1 parent 362a854 commit 13ad4f1

File tree

1 file changed

+11
-3
lines changed

1 file changed

+11
-3
lines changed

src/plugins/terminal/www/Terminal.js

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -360,12 +360,20 @@ const Terminal = {
360360
excludePaths.splice(excludePaths.indexOf("alpine/data"), 1);
361361
}
362362
if (opts.home) {
363-
includeFiles.push("public");
363+
const checkCmd = `test -e "$PREFIX/public" && echo "exists" || echo "not"`;
364+
const checkResult = await Executor.execute(checkCmd);
365+
if (checkResult === "exists") {
366+
includeFiles.push("public");
367+
}
364368
}
365369
} else {
366370
// If alpineBase is disabled, only include public if home is enabled
367371
if (opts.home) {
368-
includeFiles.push("public");
372+
const checkCmd = `test -e "$PREFIX/public" && echo "exists" || echo "not"`;
373+
const checkResult = await Executor.execute(checkCmd);
374+
if (checkResult === "exists") {
375+
includeFiles.push("public");
376+
}
369377
}
370378
}
371379

@@ -392,7 +400,7 @@ const Terminal = {
392400

393401
const result = await Executor.execute(cmd);
394402
if (result === "ok") {
395-
resolve(cordova.file.dataDirectory + "aterm_backup.tar");
403+
resolve(cordova.file.dataDirectory + "usr/aterm_backup.tar");
396404
} else {
397405
reject(result);
398406
}

0 commit comments

Comments
 (0)