Boost C++ Libraries: Ticket #3551: filesystem::directory_iterator fails on empty directories in Windows Mobile 5 https://svn.boost.org/trac10/ticket/3551 <p> In Windows Mobile 5 (and possibly other versions), <a class="missing wiki">FindFirstFile</a>() returns ERROR_NO_MORE_FILES (==18) rather than ERROR_FILE_NOT_FOUND (==2) when called on an empty directory. This behavior is also known to occur on Win32 in certain circumstances (<a class="ext-link" href="http://support.microsoft.com/kb/841524"><span class="icon">​</span>http://support.microsoft.com/kb/841524</a>). Current trunk code throws an exception from the directory_iterator constructor. </p> <p> I suggest checking for both codes; proposed patch is attached. </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/3551 Trac 1.4.3 max@… Fri, 23 Oct 2009 18:15:42 GMT attachment set https://svn.boost.org/trac10/ticket/3551 https://svn.boost.org/trac10/ticket/3551 <ul> <li><strong>attachment</strong> → <span class="trac-field-new">operations.patch</span> </li> </ul> <p> Patch for operations.hpp adding support for ERROR_NO_MORE_FILES code when returned from <a class="missing wiki">FindFirstFile</a>() </p> Ticket max@… Fri, 23 Oct 2009 18:19:11 GMT <link>https://svn.boost.org/trac10/ticket/3551#comment:1 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/3551#comment:1</guid> <description> <p> Cannot edit the caption on the attachment: it's a patch for operations.cpp, not hpp. </p> </description> <category>Ticket</category> </item> <item> <dc:creator>Beman Dawes</dc:creator> <pubDate>Sun, 06 Dec 2009 16:55:46 GMT</pubDate> <title>status changed; resolution set https://svn.boost.org/trac10/ticket/3551#comment:2 https://svn.boost.org/trac10/ticket/3551#comment:2 <ul> <li><strong>status</strong> <span class="trac-field-old">new</span> → <span class="trac-field-new">closed</span> </li> <li><strong>resolution</strong> → <span class="trac-field-new">fixed</span> </li> </ul> <p> (In <a class="changeset" href="https://svn.boost.org/trac10/changeset/58193" title="Fix #3551 for Windows Mobile">[58193]</a>) Fix <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/3551" title="#3551: Patches: filesystem::directory_iterator fails on empty directories in Windows ... (closed: fixed)">#3551</a> for Windows Mobile </p> Ticket Beman Dawes Sun, 06 Dec 2009 17:01:13 GMT <link>https://svn.boost.org/trac10/ticket/3551#comment:3 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/3551#comment:3</guid> <description> <p> (In <a class="changeset" href="https://svn.boost.org/trac10/changeset/58194" title="Fix #3551 for Windows Mobile">[58194]</a>) Fix <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/3551" title="#3551: Patches: filesystem::directory_iterator fails on empty directories in Windows ... (closed: fixed)">#3551</a> for Windows Mobile </p> </description> <category>Ticket</category> </item> </channel> </rss>