This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug libstdc++/86910] std::filesystem::create_directories doesn't set error code or throw while violating postcondition.


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86910

--- Comment #2 from Jonathan Wakely <redi at gcc dot gnu.org> ---
(In reply to Steffen Schuemann from comment #0)
> std::filesystem::create_directories should create all directories that don't
> exists in the given path. It is not an error if some of the directories
> exist. But they must be directories to fulfil the postcondition. 
> 
> The current implementation doens't signal an error if it didn't create the
> directory because a file existed with the same name, so the given
> postcondition is_directory(p) is violated but no error occurs.

That is the correct behaviour:
https://cplusplus.github.io/LWG/lwg-defects.html#2935

I don't think this is a bug.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]