-
Notifications
You must be signed in to change notification settings - Fork 80
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
File-system refactor - plus minor bugfixes #395
Conversation
Interesting. I never thought the "caching" of attributes would cause problems. It was done this way to avoid duplicated code. The pftpdService was introduced somewhat later. With a fresh look on the code it makes sense to remove the other things and get it from pftpdService as it is there now. |
f9279bb
to
56fc5f2
Compare
This megarefactor is ready to review (see only the last commit). I've updated the first comment:
I've checked, after my 2 open issues merged, my forked and the original source is identical (except some local changes for test and build). I will work on my draft "RW roSAF" PR later (I hope before this year's end). |
56fc5f2
to
493d45e
Compare
Yes, you are right, rebased it. If you add some conflicting changes after #360, I will rebase again as needed. |
here we go |
Important: Root is not tested. It builds, there is no functional change in theory, but a quick test needed. I can't test root. The only functional changes:
Tests are running (except root, I can't test it), Quick Share and Media Scanner tested manually on real Android 9 phone.
Changes:
1. remove file property "caching" (speed did not change)
2. File and FileSystemView (Fs, Root, QuickShare, Saf, RoSaf, Virtual) ctor/createFile/getFile simplification
3. mkdirs (note the 's' at the end) behavior in SAF
Note: mkdirs got backported into FsFile.mkdir(), but in RootFile.mkdir() and RootFile.createOutputStream() I've added only comments, I can't test it, better not modify it.
4. fix MediaScanner in FS an Root
Note: as mentioned above, not tested on rootFS, in theory it should work, the same code is running like under FS, but a quick manual test won't harm.
The log that shows how 3. mkdirs works in SAF with SFTP
The log that shows, that the 1. cache removing fixed SCP in #205
The log that shows how 4. MediaScanner works in FS