[libcxx-commits] [PATCH] D92769: [libc++] [P1164] [C++20] Make fs::create_directory() error if there is already a non-directory.

Marek Kurdej via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Mon Dec 7 08:41:49 PST 2020


curdeius added inline comments.


================
Comment at: libcxx/src/filesystem/operations.cpp:858
+    if (!is_directory(st)) {
+      err.report(mec); // Or err.report(errc::not_a_directory); ?
+    }
----------------
Question to reviewers, what should we return, `error_code` corresponding to `errno` (`mec`) or another error code, e.g `not_a_directory`?


================
Comment at: libcxx/src/filesystem/operations.cpp:888
+    }
+    // TODO: Check attributes?
+  } else {
----------------
I'll remove this line in the next revision.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D92769/new/

https://reviews.llvm.org/D92769



More information about the libcxx-commits mailing list