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; }
Note:
See TracTickets
for help on using tickets.