On Windows stat("foo/bar/../.") will resolve to "foo" even if that is a non-directory and "foo/bar" does not exist. This is the expected behaviour and consistent with boost::filesystem, so don't try to correct it. The only unwanted behaviour is that stat("baz/") fails due to a mingw bug (fixed in mingw-w64 v6.0.0) so add a workaround. PR libstdc++/88881 * src/c++17/fs_ops.cc (canonical(const path&, error_code&)) [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Normalize path, to match behaviour of filesystem::exists. (create_directories(const path&, error_code&)): Add assertions. (status(const path&, error_code&)) [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Add workaround for bug in _wstat for paths with trailing slash. * testsuite/27_io/filesystem/operations/create_directories.cc: Adjust for expected behaviour on mingw. * testsuite/experimental/filesystem/operations/create_directories.cc: Likewise. * testsuite/27_io/filesystem/operations/temp_directory_path.cc: Use "TMP" instead of "TMPDIR" and clean environment before each test. Do not test permissions on mingw targets. From-SVN: r268034
Name |
Last commit
|
Last update |
---|---|---|
.. | ||
absolute.cc | Loading commit data... | |
canonical.cc | Loading commit data... | |
copy.cc | Loading commit data... | |
copy_file.cc | Loading commit data... | |
create_directories.cc | Loading commit data... | |
create_directory.cc | Loading commit data... | |
create_symlink.cc | Loading commit data... | |
current_path.cc | Loading commit data... | |
equivalent.cc | Loading commit data... | |
exists.cc | Loading commit data... | |
file_size.cc | Loading commit data... | |
is_empty.cc | Loading commit data... | |
last_write_time.cc | Loading commit data... | |
permissions.cc | Loading commit data... | |
read_symlink.cc | Loading commit data... | |
remove.cc | Loading commit data... | |
remove_all.cc | Loading commit data... | |
space.cc | Loading commit data... | |
status.cc | Loading commit data... | |
temp_directory_path.cc | Loading commit data... |