create_directories should return false when the path already exists #55
Labels
available on master
Fix is done on master branch, issue closed on next release
bug
Something isn't working
Milestone
Describe the bug
For the methods
filesystem::create_directories
, the document N4687 says (see 30.10.15.6)However, the current implementation in v1.3.0 returns true everytime.
To Reproduce
// should return false as the folder already exists std::cout << boolalpha << std::filesystem::create_directories(std::filesystem::current_path()) << std::endl
Expected behavior
In case the path already exists and this is a directory, the returned value should be
false
. This is the behaviour implemented within VS2019 (16.4) and Xcode 11.Additional context
A way to fix this issue could be to test if the path already exists. For example
The text was updated successfully, but these errors were encountered: