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
Include .
and ..
in readdir() output
#28
Comments
Do you have a reference for that? I have a vague recollection that reporting |
It was problem in KIO 5.25 [1] which has been patched for the next relesse, because it affected several filesystem implementations. However, I think that is was fair for them to assume that every directory will have a |
I don't think it's fair to assume that at all. As I said above, I think the better assumption is that there will be no That said, if you want to provide a patch to report |
.
and ..
in readdir() output
The root of the issue is that the SFTP protocol doesn't include |
I think it would be a good idea to add these two entries if they are not there: For example KDE's dolphin and other file browsers rely on "." to check the permissions of the current directory. |
There is a difference between expecting |
https://cgit.kde.org/kio.git/tree/src/core/kcoredirlister.cpp#n1237 As you can see here in KIO (the filesystem abstraction used by Dolphin), https://cgit.kde.org/dolphin.git/tree/src/dolphinpart.cpp#n389 Here you can see how Dolphin queries the permissions on the It could of course be changed on Dolphin's side, but regardless of that, my point is that we can't assume people is just gonna rely on And actually, in the case of Dolphin (actually KIO), there is already a patch to workaround this: the "." entry is manually added if it's not there after enumerating all the items in a directory. See it here: https://cgit.kde.org/kio.git/tree/src/core/slavebase.cpp#n465 But I still think this could affect other file browsers, and it feels like a hack to have it on KIO's side. |
I have a small number of points:
|
I can add that Python's |
Inside a sshfs mount point,
ls -a
should show the two "." and ".." entries, but it doesn't.KDE KIO 5.25 (and hence Dolphin) uses the "." entry to get info about the current directory and determine if the 'Paste' action should be enabled or not, which causes it to be disabled inside sshfs mounts.
The text was updated successfully, but these errors were encountered: