ppareit / swiftp

FTP server for your android device.

Home Page:http://ppareit.github.com/swiftp/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[bug] Chroot doesn't get updated on external storage location change for connected clients

Xavron opened this issue · comments

commented

Ftp client already connected and then switching write external storage location causes chroot to not get updated.

To reproduce:

Create and enter a dir, use write external storage and change locations eg sd card to internal, refresh, create dir and old chroot is still in use.

Notes:

What happens on multiple clients connected? Disconnect them all? Multi user scoped storage locations voids this.

Hot swap chroot location?

Will Android allow to temporarily keep the last UriPermission around until all clients finish? Not really. Could save the URI String to shared pref and then remove on connection end. However, there's still problems in going that way. Could junk up the perm list with old stuff and just leave it.

Just show a warning or notice on change of location?

Could just continue to let the user deal with the results and the need to exit the client or get the client to clear out the cached state as it currently is.

Expected:

Should get updated when expected.