[libcxx-commits] [PATCH] D97090: [libcxx] Explicitly return the expected error code in create_directories if the parent isn't a directory

Marek Kurdej via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Sat Feb 20 00:27:39 PST 2021


curdeius added inline comments.


================
Comment at: libcxx/src/filesystem/operations.cpp:1026
       }
-    }
+    } else if (not is_directory(parent))
+      return err.report(errc::not_a_directory);
----------------
`is_directory` can take a `file_status` (so `parent_st`) to avoid requerying the filesystem.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D97090



More information about the libcxx-commits mailing list