Opened 5 years ago
#13084 new Bugs
boost::filesystem::exists returns false on existing pathnames on OSX systems
Reported by: | Owned by: | Beman Dawes | |
---|---|---|---|
Milestone: | To Be Determined | Component: | filesystem |
Version: | Boost 1.64.0 | Severity: | Problem |
Keywords: | filesystem exists | Cc: |
Description
boost::filesystem::exists returns false on existing pathnames, surprisingly. This behaviour could be observed at least on OSX El Capitan (10.11.6) with Boost 1.64.0 On Linux, the same code works fine.
For confirmation and reproduction, I provide a self-contained code that displays the output of three tests of file existence. It expects a pathname as its first (and only) argument.
Here are the outputs that it gives me on Linux and OSX (when applied to an existing pathname):
Linux:
reply of boost::filesystem::exists: true
reply of stat_exists: true
reply of stream_exists: true
OSX:
reply of boost::filesystem::exists: false
reply of stat_exists: true
reply of stream_exists: true
a short program for testing boost::filesystem:exists