Repository navigation
feat: support symlink detection when reading directories - #8554
Conversation
|
@ncw: Have you seen this PR? |
|
@huangnauh @Neustradamus sorry missed this one. Can either of you explain what it fixes please? So when using |
|
I think when the changes were made for adding symlink support for the various mount commands, we missed setting proper flags in readdir results, specifically only for the mount command. It was added for cmount & mount2, but got missed in mount. mount2 implementation: https://github.com/rclone/rclone/blob/master/cmd/mount2/node.go#L257 mount symlink changes: db1ed69 It missed the update for readdir results too. |
|
@darthShadow I think the fix looks correct. I'd just like to know what it breaks because in testing |
|
The problem is likely the difference between d_type being set in readdir and stat. At the very least d_type should be set to DT_UNKNOWN in Linux but d_type is not supported on all platforms and where it is software needs to handle DT_UNKNOWN. IE... they shouldn't assume readdir gives you the file type. Should be picked up from stat. |
|
Thanks for your input @trapexit I will merge this as it is correct. Just nosy as to what it broke! |
What is the purpose of this change?
Was the change discussed in an issue or in the forum before?
Checklist