Re: scandirat return dirents of parent dir
- Date: Wed, 5 Jul 2017 05:38:11 +0800
- From: comic fans <comicfans44@xxxxxxxxx>
- Subject: Re: scandirat return dirents of parent dir
I've already submitted a patch for this but your fix is much
quicker... confirmed this snapshot resolved the problem. Thank you.
>> I've found this problem when compile
>> casync(https://github.com/systemd/casync.git) in cygwin,workflow to
>> trigger this :
>> scandirat(rootfd,".", firstLevelDirEnts......);
>> foreach dirent in firstLevelDirEnts:
>> if dirent is dir:
>> scandirat(subdirfd,".", secondLevelDirEnts......);
>> at this time, secondLevelDirEnts should be files in subdir, but
>> in cygwin, secondLevelDirEnts is just same as firstLevelDirEnts.
>> This problem didn't happen in linux , nor win10 WSL, but
>> happens in both cygwin/msys2.
>First I thought you stumbled over the problem that the first two entries
>returned by scandirat are "." and "..", but on closer investigation I
>saw the problem.
>I pushed a fix to the git repo and uploaded new developer snapshots
>to https://cygwin.com/snapshots/ Please try.
Problem reports: http://cygwin.com/problems.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple