Skip to content

Commit 22db493

Browse files
committed
Swift: add overwrite_existing to source archiving
1 parent 521e623 commit 22db493

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

swift/extractor/SwiftExtractor.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,12 +41,12 @@ static void archiveFile(const SwiftExtractorConfiguration& config, swift::Source
4141
ensureDirectory("source archive destination", dstFilePath.parent_path());
4242

4343
std::error_code ec;
44-
fs::copy(srcFilePath, dstFilePath, ec);
44+
fs::copy(srcFilePath, dstFilePath, fs::copy_options::skip_existing, ec);
4545

4646
if (ec) {
47-
std::cerr << "Cannot archive source file " << srcFilePath << " -> " << dstFilePath
48-
<< "': " << ec.message() << "\n";
49-
return;
47+
std::cerr << "Cannot archive source file " << srcFilePath << " -> " << dstFilePath << ": "
48+
<< ec.message() << "\n";
49+
std::abort();
5050
}
5151
}
5252

0 commit comments

Comments
 (0)