Opened 14 years ago

Closed 14 years ago

#2106 closed Bugs (invalid)

oversight in "boost::filesystem::path::operator /"

Reported by: rtomov@… Owned by: Beman Dawes
Milestone: Component: filesystem
Version: Boost 1.35.0 Severity: Problem
Keywords: Cc:

Description

Using "boost::filesystem::path::operator /" with "const char*" or "const string&" as parameter is dangerous because the temporary object of type "path" is create but without control of the name's checking parameter. For example: you can write this code "string filePath = (fs::path(pathName, fs::no_check) / fileName).string();" and expect both "pathName" and "fileName" not to be checked against rules. In fact only "pathName" will not be checked but "fileName" will be checked with default checker. Thus you will receive, unexpected and unhandled, "boost::filesystem::filesystem_error" exception.

Change History (1)

comment:1 by Beman Dawes, 14 years ago

Resolution: invalid
Status: newclosed

The name check on construction has been eliminated. Users complained it was excessively nannyish. Thus there is no longer any issue so I am closing the ticket.

--Beman

Note: See TracTickets for help on using tickets.