Opened 18 years ago

Closed 17 years ago

#367 closed Bugs (Fixed)

boost::filesystem::exists has bugs with UNC paths

Reported by: nobody Owned by: beman_dawes
Milestone: Component: filesystem
Version: None Severity:
Keywords: Cc:

Description

boost::filesystem::exists(path("//computer")) always
fails, even if the computer exists. 
boost::filesystem::exists(path("//computer/share")) 
always succeeds, even if the share doesn't exist. 

The attached patch fixes this by: 
- always succeeding for //computer (this is better than
always failing)
- correctly detecting the existance or not of a share.
(The problem here was that the code was missing an
error code check)



Change History (1)

comment:1 by beman_dawes, 17 years ago

Status: assignedclosed
Logged In: YES 
user_id=51042

The ERROR_BAD_NETPATH check was already added due to another
bug report. See CVS HEAD.

Treating the "//server" case as not existing is more
consistent with the expectation that if a file system entity
exists, status information should be available. Presumably
that is why the command procession, for example, reports
"dir //server" as an error even when //server is available
on the network.

Thanks for the bug report. Sorry to delay so long in responding.

--Beman
Note: See TracTickets for help on using tickets.