Re: [uclibc-ng-devel] PATCH] Fix ntfw when called with FTW_CHDIR and FTW_DEPTH to change directory back to the parent before processing the directory (after the contents have already been processed).

22 Oct
2016
22 Oct
'16
1:45 p.m.
Hi, Ata, John (US) wrote,
Hi all,
In using ftw/nftw, I’ve discovered a bug when using FTW_CHDIR and FTW_DEPTH. After changing the working directory to a subdirectory, nftw would process the contents fine. However, it would then try and process the directory itself while still in that directory and then switch back to the parent. This would result in an error (ENOENT). This patch will change working directories to the parent before processing the directory itself.
Thanks, test case and patch applied, best regards Waldemar
3249
Age (days ago)
3249
Last active (days ago)
0 comments
1 participants
participants (1)
-
Waldemar Brodkorb