New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Android: Fixes #6779: Fixed android filesystem sync (resources) #6789
Conversation
@laurent22 I hope this fixes the remaining issue, the changes are small, so I hope this one gets merged faster than last time 😄 |
No, the app calls detete() on the sync target so it should be deleted. Is that maybe you delete call that's not working properly? |
I have tested the unlink method alone and it worked. the thing is that access framework just returns false if it fails. should try to figure if it deleted and throw IOException if it fails? Edit: should throw I believe |
does it also cleanup .resource folder ? |
You need to check the type of error. If it fails because the file doesn't exist, you should ignore the exception (see file-api-driver-webdav for example). If it's anything else you should probably rethrow. |
Document file does not throw at any circumstances, then I have to throw simply if it just returns false. edit: I was wrong, my library does, and I'm already re-throwing, the only remaining thing is the unexpected false return to check. |
@laurent22 well it seems the library is indeed removing files, it seems that there is an issue with cleaning up algorithm or sth else that the resources remain inside because I setup log points in unlink method on js side and any file it decided to unlink was indeed gone. |
you can merge this as a fix for the mentioned issue in the PR about the remaining files in resource folder, this is probably the related issue #932 |
Ok let's merge then, thanks for the fix! |
Is there an ETA for when this is getting released? |
@LegendL3n the latest android pre-releases can be found there. |
Fixes #6779
It seems I had missed the retry part of
copy
function insidefs-driver-rn.ts
, which were causing it to not return the proper error.I also made sure its possible to copy files between scoped storage style and normal path style, but the functionality is limited to where the app has permission, which I assume it will work fine with joplin's use case. I tested adding a picture and syncing to make sure it works.
what concerns me more, is that the files still remain in the synced folder, even after the notes are deleted and synced. is this intended?