Skip to content
This repository has been archived by the owner on Aug 11, 2024. It is now read-only.

Fix symbolic linker errors #804

Merged
merged 2 commits into from
Apr 2, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -453,23 +453,32 @@ private static bool VerifySymbolicLink(string targetAbsolutePath)
}
else
{
var tempFile = $"{targetAbsolutePath}/temp_test.txt";
var tempFile = $"{targetAbsolutePath}/symlink_temp.txt";

try
{
if (!File.Exists(tempFile))
{
File.CreateText(tempFile).Dispose();
var stream = File.CreateText(tempFile);
stream.Dispose();
stream.Close();
}

if (File.Exists(tempFile))
{
File.Delete(tempFile);
}
}
catch (DirectoryNotFoundException)
catch (Exception e)
{
return false;
switch (e)
{
case AccessViolationException _:
case IOException _:
return true;
default:
return false;
}
}
}

Expand Down