[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
Sat Feb 20 05:49:19 PST 2021


mstorsjo added inline comments.


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


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