#12574 closed Bugs (invalid)
is_directory sets boost::system::errc::no_such_process when path contains more directory components
Reported by: | Owned by: | Beman Dawes | |
---|---|---|---|
Milestone: | To Be Determined | Component: | filesystem |
Version: | Boost 1.62.0 | Severity: | Problem |
Keywords: | windows | Cc: |
Description
Assume there is a directory "/tmp", then is_directory("/tmp", error) returns true and sets error's value to success.
When we query for subdirectory, like is_directory("/tmp/foo", error), then the function returns false and sets error's value to no_such_file_or_directory. It is OK.
However, query like is_directory("/tmp/foo/bar") sets error's value to no_such_process. It is completely unexpected & counterintuitive. It seems that this value is returned when the part of path after an existing directory contains directory separator(s) -- here "foo/bar".
This happens on Windows, I haven't tested it on Linux.
Change History (2)
comment:1 by , 6 years ago
Resolution: | → invalid |
---|---|
Status: | new → closed |
comment:2 by , 6 years ago
Thank you very much, I wasn't aware of the differences between error code and condition. Sorry for bothering you.
A test case has been added to operations_test.cpp. It passes just fine, and a display of the error code values shows 2 and 3 on Windows:
See https://msdn.microsoft.com/en-us/library/windows/desktop/ms681382(v=vs.85).aspx
So it looks like you are confusing Windows specific
error_code
values with the portableerror_condition
values: