We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9c73ae5 commit 8591817Copy full SHA for 8591817
swift/extractor/SwiftExtractor.cpp
@@ -52,6 +52,13 @@ static void extractFile(const SwiftExtractorConfiguration& config, swift::Source
52
llvm::SmallString<PATH_MAX> tempTrapPath(config.trapDir);
53
llvm::sys::path::append(tempTrapPath, tempTrapName);
54
55
+ llvm::StringRef trapParent = llvm::sys::path::parent_path(tempTrapPath);
56
+ if (std::error_code ec = llvm::sys::fs::create_directories(trapParent)) {
57
+ std::cerr << "Cannot create trap directory '" << trapParent.str() << "': " << ec.message()
58
+ << "\n";
59
+ return;
60
+ }
61
+
62
std::ofstream trap(tempTrapPath.str().str());
63
if (!trap) {
64
std::error_code ec;
0 commit comments