mirror of
https://github.com/rui314/mold.git
synced 2024-10-04 00:31:41 +03:00
Attempt to fix CI
This commit is contained in:
parent
4cc61361f3
commit
07b09a66d3
@ -44,9 +44,8 @@ void MappedFile::close_fd() {
|
||||
}
|
||||
|
||||
void MappedFile::reopen_fd(const std::string &path) {
|
||||
if (fd != -1)
|
||||
close(fd);
|
||||
fd = open(path.c_str(), O_RDONLY);
|
||||
if (fd == -1)
|
||||
fd = open(path.c_str(), O_RDONLY);
|
||||
}
|
||||
|
||||
} // namespace mold
|
||||
|
@ -72,11 +72,10 @@ void MappedFile::close_fd() {
|
||||
}
|
||||
|
||||
void MappedFile::reopen_fd(const std::string &path) {
|
||||
if (fd != INVALID_HANDLE_VALUE)
|
||||
CloseHandle(fd);
|
||||
fd = CreateFileA(path.c_str(), GENERIC_READ,
|
||||
FILE_SHARE_READ | FILE_SHARE_WRITE | FILE_SHARE_DELETE,
|
||||
nullptr, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, nullptr);
|
||||
if (fd == INVALID_HANDLE_VALUE)
|
||||
fd = CreateFileA(path.c_str(), GENERIC_READ,
|
||||
FILE_SHARE_READ | FILE_SHARE_WRITE | FILE_SHARE_DELETE,
|
||||
nullptr, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, nullptr);
|
||||
}
|
||||
|
||||
} // namespace mold
|
||||
|
Loading…
Reference in New Issue
Block a user