saber-notes/saber

Saving files in custom data dir not working

Opened this issue · 5 comments

Before submitting an issue, please check the following

  • I have searched for similar issues (both open and closed) and cannot find a duplicate
  • I agree to follow the Code of Conduct

Describe the bug

On the newest Saber version, custom data dirs selected via the UI (in this case a Syncthing directory) do not allow notes to be saved, and thereby the editor cannot be exited without closing the app manually.

To reproduce

  1. Be on the newest (v0.21.4) version of Saber on Android
  2. Set a custom data directory via the Settings UI
  3. Create a note and attempt to save it by either backing out or by clicking the save icon at the top left

Expected behavior

The file to save and the editor to close as normal

Saber version

v0.21.4

Device

  • Device: Samsung SM-X510
  • OS: Android 14 (OneUI 6.0)

Anything else?

No response

Can reproduce on pixel 6 with grapheneos.
Notably I cannot find any option to enable storage scopes for the Saber app, which would normally be required by any other app using shared storage space. seems like it might not be requesting permissions for storage?

I guess that newly created directory has permission issue

I wanted to use Synching so I changed the directory and lost all my files (I didn't have much but still..). I can't create new notes too.

Getting this error message in saving the note in the custom directory

Exception has occurred. PathAccessException (PathAccessException: Cannot open file, path = '/storage/emulated/0/Eg/24-05-25 Untitled.sbn2' (OS Error: Operation not permitted, errno = 1))


This exception is thrown from the file: lib/pages/editor/editor.dart at line number 905 when running the app in the debug mode

Getting this error message in saving the note in the custom directory

Exception has occurred. PathAccessException (PathAccessException: Cannot open file, path = '/storage/emulated/0/Eg/24-05-25 Untitled.sbn2' (OS Error: Operation not permitted, errno = 1)) This exception is thrown from the file: lib/pages/editor/editor.dart at line number 905 when running the app in the debug mode

I think that this should be due to the permission of access of storage. I look at the list of permissions of Saber, and it does not contain such a permission, and thus this error is expected.