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:
Gwen Mittertreiner
2019-03-15 12:24:20 -07:00
parent dee8d7b2ed
commit c45381d286

View File

@@ -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
}