id summary reporter owner description type status milestone component version severity resolution keywords cc 8946 filesystem::directory_iterator returns incorrect listing l.alebarde@… Beman Dawes "Both '''directory_iterator''' and '''recursive_directory_iterator''' do not work correctly under linux with g++-4.7.3 : one item, assumed to be the last one, is not listed. Simple code to reproduce the problem : {{{ #include #include #include using namespace std; namespace bfs = boost::filesystem; int main () { system(""mkdir mydir""); system(""touch mydir/file1""); system(""touch mydir/file2""); bfs::directory_iterator bfs_dir_i_end; bfs::directory_iterator bfs_dir_i(""mydir/.""); while (++bfs_dir_i != bfs_dir_i_end) { bfs::file_type type = (*bfs_dir_i).status().type(); bfs::path source = (*bfs_dir_i).path(); cout << source << "" "" << type << endl; } } }}} Build with : {{{ g++-4.7.3 -I/usr/include/crypto++ -O0 -g3 -Wall -c -fmessage-length=0 -std=c++11 show_bug_directory_iterator.cpp g++-4.7.3 -lboost_filesystem -o show_bug_directory_iterator show_bug_directory_iterator.o }}} Code result : {{{ $ ./show_bug_directory_iterator ""mydir/./file1"" 2 }}} Should be : {{{ $ ./show_bug_directory_iterator ""mydir/./file1"" 2 ""mydir/./file2"" 2 }}} Shell result : {{{ $ ls -lR . .: total 1620 drwxr-xr-x 2 alain alain 4096 31 juil. 10:48 mydir -rwxr-xr-x 1 alain alain 639766 31 juil. 10:48 show_bug_directory_iterator -rw-r--r-- 1 alain alain 497 31 juil. 10:44 show_bug_directory_iterator.cpp -rw-r--r-- 1 alain alain 1006376 31 juil. 10:48 show_bug_directory_iterator.o ./mydir: total 0 -rw-r--r-- 1 alain alain 0 31 juil. 10:48 file1 -rw-r--r-- 1 alain alain 0 31 juil. 10:48 file2 }}} Notes : 1) Not tested under other gcc versions. 2) Tested with same results on Boost 1.52.0 and 1.53.0 3) suspected regression, cf [https://svn.boost.org/trac/boost/ticket/257]" Bugs new To Be Determined filesystem Boost 1.54.0 Problem directory_iterator