[Boost-bugs] [Boost C++ Libraries] #3867: [filesystem] filesystem::exists() improperly throws on windows when path specifies an empty CD/DVD drive

Subject: [Boost-bugs] [Boost C++ Libraries] #3867: [filesystem] filesystem::exists() improperly throws on windows when path specifies an empty CD/DVD drive
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2010-01-27 22:57:52


#3867: [filesystem] filesystem::exists() improperly throws on windows when path
specifies an empty CD/DVD drive
---------------------------+------------------------------------------------
 Reporter: David Grigsby | Owner: bemandawes
     Type: Bugs | Status: new
Milestone: Boost 1.42.0 | Component: filesystem
  Version: Boost 1.41.0 | Severity: Problem
 Keywords: |
---------------------------+------------------------------------------------
 If you call filesystem::exists() with a path pointing to an empty cd/dvd
 drive on windows, a filesystem exception will be thrown due to
 status_template returning fs::status_unknown.

 Boost 1.41.0 returns fs::file_not_found for "USB card reader with no card
 inserted" (operations.cpp, line 195).

 The comment is "these are not considered errors; the status is considered
 not found".

 I believe an empty cd/dvd drive should be treated analogously to an empty
 USB card reader, that is, no exception should be thrown.

 The exception is occurring because the error code returned by windows
 (ERROR_NOT_READY) is not in the list of codes that are specifically
 checked.

 I am attaching a patch.

 Thanks!

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/3867>
Boost C++ Libraries <http://www.boost.org/>
Boost provides free peer-reviewed portable C++ source libraries.

This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:02 UTC