Skip to content

Commit 4067caf

Browse files
feat: added public directory
1 parent 6121291 commit 4067caf

1 file changed

Lines changed: 19 additions & 0 deletions

File tree

src/pages/fileBrowser/fileBrowser.js

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1073,6 +1073,25 @@ function FileBrowserInclude(mode, info, doesOpenLast = true) {
10731073
console.error("Error checking Terminal installation:", error);
10741074
}
10751075

1076+
try{
1077+
const terminalPublicUrl = cordova.file.dataDirectory + "public";
1078+
1079+
// Check if this storage is not already in the list
1080+
const terminalPublicStorageExists = allStorages.find(
1081+
(storage) =>
1082+
storage.uuid === "terminal-public" ||
1083+
storage.url === terminalPublicUrl,
1084+
);
1085+
1086+
if (!terminalPublicStorageExists) {
1087+
util.pushFolder(allStorages, "Terminal Public", terminalPublicUrl, {
1088+
uuid: "terminal-public",
1089+
});
1090+
}
1091+
}catch(err){
1092+
console.error("Error while adding public directory", err);
1093+
}
1094+
10761095
try {
10771096
const res = await externalFs.listStorages();
10781097
res.forEach((storage) => {

0 commit comments

Comments
 (0)