Closed lmagyar closed 1 week ago
Now it's ready to review.
but WinSCP got completely broken and couldn't figure out the reason
Over the years I had similar issues with some clients :smile:
With this PR:
Well, I also see that current code and behavior is not perfect. With current code it would be possible to access files on root folder which is not possible with new code. But would be ok for me to change this.
Wit new code IDE complains about Paths.get()
would require a higher API level than the App demands. On my test systems/devices that does not cause an issue but it might for people with old phones.
Could you find a solution without Paths.get()
?
Oh, and this change breaks my test script. tests/tests.py As it expects the old behavior. Thus some more work is required to switch to new behavior.
So, I think I've found finally an even better solution:
That seems to be a good and elegant approach :+1:
UPDATE: complete rewrite of this comment
Without this PR, pftpd VirtFS behaves errorneously:
/storage/emulated/0
is selected as startDir/fs
/fs
to/fs/storage/emulated/0
, that's OK, we can..
out, and when on/fs
again, it shows the startDir's content, but can't access the folders in it anymore, so gets broken/
is the startDir, works everythingWith this PR:
/fs
, eg. we have/fs/Android
if startDir is/storage/emulated/0
or we have/fs/storage
if startDir is/
~/fs/storage/emulated/0
/
as start folder)~/saf
and/rosaf
folders, where we can see the content of the selected SD card folder~Just fun fact: I made a version (https://github.com/lmagyar/prim-ftpd/tree/dev-dual-root-and-home-for-sshfs), where depending on SSHFS's start dir,
/
or nothing=user's home, it was able to see the/
folder under/fs
(when/
is SSHFS's start dir), or the selected startDir, eg./storage/emulated/0
under/fs
(when` is the SSHFS start dir), it was soo cool, but WinSCP got completely broken and couldn't figure out the reason, even my fake symlink experiments on
/fs` etc. folders were broken, so gave up. :(