Opened 17 years ago

Closed 17 years ago

#537 closed Bugs (Later)

boost::filesystem::exists and permission problem

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

Description

If /a/b/c has 444 permissions and you call exists on
/a/b/c/d/e.txt it will return true, even if this file
does not exist.  I think that if permissions prevent
proper calculation a filesystem_error should be thrown.

Change History (3)

comment:1 by tomcraignelson, 17 years ago

Logged In: YES 
user_id=914778

I wish I had logged in so I could get email on this.  I have
an account here: tomCraigNelson, can someone who administers
this make this happen? Thanks -- Tom.

comment:2 by beman_dawes, 17 years ago

Logged In: YES 
user_id=51042

What operating system is involved?

--Beman

comment:3 by beman_dawes, 17 years ago

Status: assignedclosed
Logged In: YES 
user_id=51042

Never mind about the request for what operating system; I
see what is happening.

This is yet another example of why exists() needs three
possible outcomes - true, false, and error.

That has been fixed for 1.34, and yes, an exception will be
thrown. Furthermore, if an exception isn't appropriate for
the application, the status() function can be used.

If you need the new functionality now, it is on the i18n
branch in CVS.

Cheers,

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