[libcxx-commits] [PATCH] D106217: [libcxx] Fix create_directories returning false but actually creating the directories, if the path name is with trailing seperators
Cao Jingfan via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Tue Jul 20 21:00:48 PDT 2021
caojingfan added a comment.
In D106217#2891410 <https://reviews.llvm.org/D106217#2891410>, @ldionne wrote:
> It looks like CI is failing, so that should be addressed. Also, can you provide a link to the place where it says how `create_directories` should behave the way you say (I believe you, I just don't know the filesystem spec by heart and I want to check). Thanks for fixing this!
Thanks for reviewing.
The CI failing actually is involving a more complicated (possibly)misbehavior about path::parent_path() function which I am currently investigating.
As for why `create_directories` should behave this way, it is obvious, according to the definition of the return value of `create_directories` https://en.cppreference.com/w/cpp/filesystem/create_directory, that `create_directories` can not create the directories and return false indicating that it didn't create the directories at the same time, also I can list some supplementaries:
1. GCC 8.3 has fixed this, see https://godbolt.org/z/qe8YGj9zr
2. A stackoverflow discussion regarding to this, https://stackoverflow.com/questions/60130796/return-value-of-stdfilesystemcreate-directories-on-paths-with-trailing-sla
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D106217/new/
https://reviews.llvm.org/D106217
More information about the libcxx-commits
mailing list