Skip to content

Commit 029f5d4

Browse files
committed
feat: simplify terminal path handling
1 parent 976ae02 commit 029f5d4

1 file changed

Lines changed: 5 additions & 8 deletions

File tree

src/components/terminal/terminalManager.js

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -834,14 +834,11 @@ class TerminalManager {
834834
if (prootPath.startsWith("/public")) {
835835
// /public -> /data/user/0/com.foxdebug.acode/files/public
836836
convertedPath = `file://${dataDir}/files${prootPath}`;
837-
} else if (prootPath.startsWith("/sdcard")) {
838-
// /sdcard
839-
convertedPath = `file://${prootPath}`;
840-
} else if (prootPath.startsWith("/storage")) {
841-
// /storage
842-
convertedPath = `file://${prootPath}`;
843-
} else if (prootPath.startsWith("/data")) {
844-
// /data
837+
} else if (
838+
prootPath.startsWith("/sdcard") ||
839+
prootPath.startsWith("/storage") ||
840+
prootPath.startsWith("/data")
841+
) {
845842
convertedPath = `file://${prootPath}`;
846843
} else if (prootPath.startsWith("/")) {
847844
// Everything else is relative to alpine root

0 commit comments

Comments
 (0)