Swift: fix remapping bug

This issue has slipped during a recent refactoring:
https://github.com/github/codeql/pull/10987/files#diff-c5ab26a06a93c4507a834859a6a56878d5bfe16c4d7cbac4afc4f081d46f461aL63-R64
This commit is contained in:
Alex Denisov
2022-11-22 13:47:24 +01:00
parent 29c47ad515
commit 8f02463411

View File

@@ -61,7 +61,7 @@ void finalizeRemapping(
}
auto hash = originalHashFile(original);
auto hashed = scratchDir / hash;
if (!hash.empty() && fs::exists(hashed)) {
if (!hash.empty() && fs::exists(patched)) {
std::error_code ec;
fs::create_symlink(/* target */ patched, /* symlink */ hashed, ec);
if (ec) {