Boost logo

Boost :

From: (noreply_at_[hidden])
Date: 2007-04-16 16:52:58

Bugs item #1701807, was opened at 2007-04-16 15:52
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting:

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: filesystem
Group: None
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Hartmut Kaiser (hkaiser)
Assigned to: Beman Dawes (beman_dawes)
Summary: exists() throws exeption on existing but locked file on wind

Initial Comment:
boost::filesystem::exists(somepath) throws an exception from when 'somepath' exists but is locked by some other process (at least on Windows).

A simple way to reproduce the effect is:

#include <iostream>
#include <boost/filesystem.hpp>

int main()
    boost::filesystem::path p("C:\\pagefile.sys");
    try {
    catch (...) {
        std::cerr << "Ooops..." << std::endl;
    return 0;

Throwing an exception doesn't seem to be the right thing here, since the file actually exists, so I'ld expect to get a 'true' back from exists().


You can respond by visiting:

This email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
Boost-bugs mailing list

Boost list run by bdawes at, gregod at, cpdaniel at, john at