mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
Windows: Close Handle after Resolving Symlinks
Calling resolvePathSymlinks twice on the same path failed with a sharing exception due to the old handle still being help.
This commit is contained in:
@@ -859,6 +859,7 @@ std::string SwiftLangSupport::resolvePathSymlinks(StringRef FilePath) {
|
||||
|
||||
DWORD success = GetFinalPathNameByHandleA(
|
||||
fileHandle, full_path, sizeof(full_path), FILE_NAME_NORMALIZED);
|
||||
CloseHandle(fileHandle);
|
||||
return (success ? full_path : InputPath);
|
||||
#endif
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user