From: Beman Dawes (bdawes_at_[hidden])
Date: 2005-03-17 20:58:03
At 11:59 AM 3/17/2005, Martin Bonner wrote:
>From: Robert Mathews [mailto:rmathews_at_[hidden]]
>Sent: 17 March 2005 14:56
>Subject: [boost] Re: [Boost-bugs] [ boost-Bugs-1164057
>]boost::filesystem::exists has bugs with UNC paths
>>> Initial Comment:
>>> boost::filesystem::exists(path("//computer")) always
>>> fails, even if the computer exists.
>I shall call this, Issue A.
>>> always succeeds, even if the share doesn't exist.
>... and this Issue B.
>> Can anyone actually comment on when or if this bug might actually get
>> fixed? It's an obvious bug, the fix is a trivial amount of work - it
>> comes with a patch that I've tested on Win32 ....
>Well, as I have indicated above, there are two separate and distinct
>Issue B does seem like a bug to me. On the other hand, does your fix
>it so that //computer/printer is reported as a filesystem? That would be
A true return from exists() doesn't make any claim that the path is to a
filesystem. Consider this program:
int main( int argc, char * argv )
std::ofstream os( argv );
if ( !os )
std::cout << "Could not open " << argv << std::endl;
os << "Hello, printer!\n";
The network name of my machine is "bgd". It has a shared printer named
"NECSuper". If I invoke the above program (named "test") like this:
A page gets printed with text: "Hello, printer!"
Could not open \\bgd
Could not open \\bgd\no_such
So I would likewise expect calls to exists("//bgd/NECSuper" ) and
exists("con:") to return true, and a call to exists("//bgd/no_such") to
My initial feeling about exists("//bgd") is that it should return false,
but I'm not very sure about that one and would like to hear more opinions.
Thanks for the comments,