Boost C++ Libraries: Ticket #3867: [filesystem] filesystem::exists() improperly throws on windows when path specifies an empty CD/DVD drive https://svn.boost.org/trac10/ticket/3867 <p> 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. </p> <p> Boost 1.41.0 returns fs::file_not_found for "USB card reader with no card inserted" (operations.cpp, line 195). </p> <p> The comment is "these are not considered errors; the status is considered not found". </p> <p> I believe an empty cd/dvd drive should be treated analogously to an empty USB card reader, that is, no exception should be thrown. </p> <p> 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. </p> <p> I am attaching a patch. </p> <p> Thanks! </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/3867 Trac 1.4.3 David Grigsby <dgrigsby@…> Wed, 27 Jan 2010 22:59:18 GMT attachment set https://svn.boost.org/trac10/ticket/3867 https://svn.boost.org/trac10/ticket/3867 <ul> <li><strong>attachment</strong> → <span class="trac-field-new">patchfile.patch</span> </li> </ul> <p> patch top operations.cpp with proposed fix </p> Ticket Beman Dawes Tue, 25 May 2010 23:18:18 GMT status changed; resolution set https://svn.boost.org/trac10/ticket/3867#comment:1 https://svn.boost.org/trac10/ticket/3867#comment:1 <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/62218" title="Fix #3867, both for ERROR_NOT_READY and ERROR_INVALID_DRIVE. These ...">[62218]</a>) Fix <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/3867" title="#3867: Bugs: [filesystem] filesystem::exists() improperly throws on windows when ... (closed: fixed)">#3867</a>, both for ERROR_NOT_READY and ERROR_INVALID_DRIVE. These happen when CD/DVD drive has no disc and USB card reader has no card, respectively. </p> Ticket