Opened 5 years ago

#13084 new Bugs

boost::filesystem::exists returns false on existing pathnames on OSX systems

Reported by: fabrice.ducos@… 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

Attachments (1)

test_file_exists.cpp (1.0 KB ) - added by fabrice.ducos@… 5 years ago.
a short program for testing boost::filesystem:exists

Download all attachments as: .zip

Change History (1)

by fabrice.ducos@…, 5 years ago

Attachment: test_file_exists.cpp added

a short program for testing boost::filesystem:exists

Note: See TracTickets for help on using tickets.