Opened 18 years ago

Closed 17 years ago

#356 closed Bugs (Fixed)

boost::filesystem::native() should reject '/' on non-Win32

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

Description

On Win32, filesystem::native() correctly checks paths
for validity on Win32.  For other systems, it just
returns true, presumably on the theory that for Unix,
anything goes.  Unless I'm much mistaken though, the
character '/' is not allowed in Unix filenames.  As
such, native() should be changed as follows:

BOOST_FILESYSTEM_DECL bool native( const std::string
&name )
{
  return name.find('/') == std::string::npos;
}

Change History (1)

comment:1 by beman_dawes, 17 years ago

Status: assignedclosed
Logged In: YES 
user_id=51042

Fixed in both head and i18n branch.

Thanks for the report.
Note: See TracTickets for help on using tickets.