From 20ac7384f8ca558f1fb933eda846604792240ea0 Mon Sep 17 00:00:00 2001 From: Stefan Boberg Date: Tue, 5 Oct 2021 22:25:53 +0200 Subject: Merged from upstream --- zencore/filesystem.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'zencore/filesystem.cpp') diff --git a/zencore/filesystem.cpp b/zencore/filesystem.cpp index f6ba92f98..745fe0779 100644 --- a/zencore/filesystem.cpp +++ b/zencore/filesystem.cpp @@ -63,6 +63,13 @@ DeleteReparsePoint(const wchar_t* Path, DWORD dwReparseTag) bool CreateDirectories(const wchar_t* Dir) { + // This may be suboptimal, in that it appears to try and create directories + // from the root on up instead of from some directory which is known to + // be present + // + // We should implement a smarter version at some point since this can be + // pretty expensive in aggregate + return std::filesystem::create_directories(Dir); } @@ -522,7 +529,7 @@ WriteFile(std::filesystem::path Path, IoBuffer Data) WriteFile(Path, &DataPtr, 1); } -IoBuffer +IoBuffer FileContents::Flatten() { if (Data.size() == 1) -- cgit v1.2.3