Opened 13 years ago

Closed 13 years ago

Last modified 13 years ago

#3551 closed Patches (fixed)

filesystem::directory_iterator fails on empty directories in Windows Mobile 5

Reported by: max@… Owned by: Beman Dawes
Milestone: Component: filesystem
Version: Boost Development Trunk Severity: Problem
Keywords: Cc:

Description

In Windows Mobile 5 (and possibly other versions), FindFirstFile() 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 (http://support.microsoft.com/kb/841524). Current trunk code throws an exception from the directory_iterator constructor.

I suggest checking for both codes; proposed patch is attached.

Attachments (1)

operations.patch (492 bytes ) - added by max@… 13 years ago.
Patch for operations.hpp adding support for ERROR_NO_MORE_FILES code when returned from FindFirstFile()

Download all attachments as: .zip

Change History (4)

by max@…, 13 years ago

Attachment: operations.patch added

Patch for operations.hpp adding support for ERROR_NO_MORE_FILES code when returned from FindFirstFile()

comment:1 by max@…, 13 years ago

Cannot edit the caption on the attachment: it's a patch for operations.cpp, not hpp.

comment:2 by Beman Dawes, 13 years ago

Resolution: fixed
Status: newclosed

(In [58193]) Fix #3551 for Windows Mobile

comment:3 by Beman Dawes, 13 years ago

(In [58194]) Fix #3551 for Windows Mobile

Note: See TracTickets for help on using tickets.