[libcxx-commits] [PATCH] D97090: [libcxx] Explicitly return the expected error code in create_directories if the parent isn't a directory
Martin Storsjö via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Tue Mar 2 12:24:28 PST 2021
This revision was automatically updated to reflect the committed changes.
Closed by commit rGc5e8f024dca9: [libcxx] Explicitly return the expected error code in create_directories if the… (authored by mstorsjo).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D97090/new/
https://reviews.llvm.org/D97090
Files:
libcxx/src/filesystem/operations.cpp
Index: libcxx/src/filesystem/operations.cpp
===================================================================
--- libcxx/src/filesystem/operations.cpp
+++ libcxx/src/filesystem/operations.cpp
@@ -1023,7 +1023,8 @@
if (ec && *ec) {
return false;
}
- }
+ } else if (not is_directory(parent_st))
+ return err.report(errc::not_a_directory);
}
return __create_directory(p, ec);
}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D97090.327541.patch
Type: text/x-patch
Size: 418 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20210302/c1282b8c/attachment.bin>
More information about the libcxx-commits
mailing list