diff options
Diffstat (limited to 'llvm/lib/Support/FileCollector.cpp')
-rw-r--r-- | llvm/lib/Support/FileCollector.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/llvm/lib/Support/FileCollector.cpp b/llvm/lib/Support/FileCollector.cpp index e13a7b5..cb83d84 100644 --- a/llvm/lib/Support/FileCollector.cpp +++ b/llvm/lib/Support/FileCollector.cpp @@ -34,7 +34,6 @@ static bool isCaseSensitivePath(StringRef Path) { FileCollector::FileCollector(std::string Root, std::string OverlayRoot) : Root(std::move(Root)), OverlayRoot(std::move(OverlayRoot)) { - sys::fs::create_directories(this->Root, true); } bool FileCollector::getRealPath(StringRef SrcPath, @@ -150,6 +149,11 @@ copyAccessAndModificationTime(StringRef Filename, } std::error_code FileCollector::copyFiles(bool StopOnError) { + auto Err = sys::fs::create_directories(Root, /*IgnoreExisting=*/true); + if (Err) { + return Err; + } + std::lock_guard<std::mutex> lock(Mutex); for (auto &entry : VFSWriter.getMappings()) { |