Skip to content

Commit 00ccf5c

Browse files
authored
Merge pull request #22851 from jketema/jketema/swift-file-open
Swift: Do not terminate the extractor when a file cannot be opened
2 parents 9ae8dbe + a13a814 commit 00ccf5c

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

‎swift/extractor/infra/file/TargetFile.cpp‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,9 +50,10 @@ bool TargetFile::init() {
5050
checkOutput("open");
5151
return true;
5252
}
53-
CODEQL_ASSERT(errno == EEXIST, "Unable to open {} for writing ({})", targetPath,
53+
CODEQL_EXPECT(errno == EEXIST, "Unable to open {} for writing ({})", targetPath,
5454
currentErrorCode());
55-
// else the file already exists and we just lost the race
55+
// else the file already exists and we just lost the race, or some error occurred
56+
// and the file could not be created
5657
return false;
5758
}
5859

0 commit comments

Comments
 (0)