I tried to implement a recursive chmod using walkdir (linux only). Sadly, the parent directory seems to be emitted by the iterator AFTER the call to readdir was done. This means that, if the parent directory originally has no read/execute permissions, the walker does not descend further, even though it could after I changed the parents permissions.
I'm not sure I would classify this as a bug, but I just wasted about 30 minutes trying to figure out why my code doesn't work, so a line of documentation specifying this behaviour might be useful.
I tried to implement a recursive
chmod
using walkdir (linux only). Sadly, the parent directory seems to be emitted by the iterator AFTER the call toreaddir
was done. This means that, if the parent directory originally has no read/execute permissions, the walker does not descend further, even though it could after I changed the parents permissions.I'm not sure I would classify this as a bug, but I just wasted about 30 minutes trying to figure out why my code doesn't work, so a line of documentation specifying this behaviour might be useful.