Skip to content

Commit

Permalink
fix android fs forbidden
Browse files Browse the repository at this point in the history
  • Loading branch information
lindongchen committed Oct 29, 2024
1 parent d00bcd4 commit 29edc01
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 3 deletions.
2 changes: 2 additions & 0 deletions gui/src-tauri/capabilities/main.json
Original file line number Diff line number Diff line change
Expand Up @@ -290,6 +290,8 @@
{
"identifier": "fs:scope",
"allow": [
{ "path": "$DOCUMENT" },
{ "path": "$DOCUMENT/**" },
{ "path": "$APPDATA" },
{ "path": "$APPDATA/**" },
{ "path": "$HOME" },
Expand Down
2 changes: 2 additions & 0 deletions gui/src-tauri/capabilities/windows.json
Original file line number Diff line number Diff line change
Expand Up @@ -291,6 +291,8 @@
{
"identifier": "fs:scope",
"allow": [
{ "path": "$DOCUMENT" },
{ "path": "$DOCUMENT/**" },
{ "path": "$APPDATA" },
{ "path": "$APPDATA/**" },
{ "path": "$HOME" },
Expand Down
2 changes: 1 addition & 1 deletion gui/src/layout/AppRoot.vue
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,7 @@ const toggleLeft = () => {
onMounted(() => {
pipyInit();
timmer();
writeMobileFile('Readme.txt', `Welcome ZTM!`);
writeMobileFile('Readme.txt', `Welcome ZTM workspace!`);
});
</script>
Expand Down
4 changes: 2 additions & 2 deletions gui/src/utils/file.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,10 +59,10 @@ const getSavePath = (target, dft) => {
return decodeURI(target);
}
}
const androidRoot = "/storage/emulated/0/com.flomesh.ztm"
// const androidRoot = "/storage/emulated/0/com.flomesh.ztm"
const createFile = (name) => {
if(platform() == 'android'){
//Android forbidden path
//fix Android forbidden path
return create(name, {
write:true,
create:true,
Expand Down

0 comments on commit 29edc01

Please sign in to comment.