wolpi / prim-ftpd

FTP server app for android
Other
580 stars 78 forks source link

Make SAF, ROSAF and virtual directories searchable #347

Closed lmagyar closed 3 weeks ago

lmagyar commented 1 month ago

Plain old FS gets this info from the real FS, and folders are executable=searchable (rwxrwxrwx).

In case of SAF and ROSAF: set isExecutable() true for folders. In case of virtual: use the backing FS or be default true (for the / and the /fs, etc. folders).

Without executable bit set, the folders created by SSHFS on the client can't be selected as working directories. (eg. cd .../saf/Anything results in "Access denied")

Note: The ROSAF part is not tested.

wolpi commented 1 month ago

Oh yes, that makes sense. I think the changes should rather be done on the non-ssh version of the classes:

That way it would work for FTP, too.

lmagyar commented 1 month ago

Yeah, nice catch. :) I was so concentrated on the sftp... I will do it after dinner. :D

lmagyar commented 1 month ago

So, no change, because isExecutable() is only part of SshFile interface and not part of FtpFile interface (it seems that ftp doesn't use this info), and that's why I've put it into XxxSshFile.

wolpi commented 3 weeks ago

I still think this can be done in AbsractFile, moved it there.

Thanks!

wolpi commented 3 weeks ago

last commit should have been assigned to #352