----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/48314/#review138888 -----------------------------------------------------------
Fix it, then Ship it! 3rdparty/stout/include/stout/os/empty.hpp (line 37) <https://reviews.apache.org/r/48314/#comment204090> Looks like the Windows version of `readdir` and its internal calls do set errno ([exmaple](https://github.com/apache/mesos/blob/56503ea6547c65de7e3e7b294419400894d54003/3rdparty/stout/include/stout/internal/windows/dirent.hpp#L133)) so we don't have to explicitly set things here. 3rdparty/stout/include/stout/os/empty.hpp (line 42) <https://reviews.apache.org/r/48314/#comment204091> No need for this. 3rdparty/stout/include/stout/os/empty.hpp (line 53) <https://reviews.apache.org/r/48314/#comment204088> `closedir(root)` here too. To preserve the errno from readdir, we can do something like [this](https://github.com/apache/mesos/blob/56503ea6547c65de7e3e7b294419400894d54003/3rdparty/stout/include/stout/os/posix/rmdir.hpp#L98-L102). - Jiang Yan Xu On June 20, 2016, 4:41 p.m., Anindya Sinha wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/48314/ > ----------------------------------------------------------- > > (Updated June 20, 2016, 4:41 p.m.) > > > Review request for mesos, Neil Conway and Jiang Yan Xu. > > > Bugs: MESOS-5448 > https://issues.apache.org/jira/browse/MESOS-5448 > > > Repository: mesos > > > Description > ------- > > Added os::empty(path) to check if contents in a directory is empty. > > > Diffs > ----- > > 3rdparty/stout/include/Makefile.am f10c836c1ac008cc4055741648b5e7dd697e4c1e > 3rdparty/stout/include/stout/os.hpp > 53b00932693fba7cf6514da6a519269a904de345 > 3rdparty/stout/include/stout/os/empty.hpp PRE-CREATION > 3rdparty/stout/tests/os/rmdir_tests.cpp > a11bfc9f9e6cbb05f3e9ce0ea48297b8f88fe53f > > Diff: https://reviews.apache.org/r/48314/diff/ > > > Testing > ------- > > All tests passed. > > > Thanks, > > Anindya Sinha > >