Skip to content

Commit

Permalink
fix: account for macOS hard link errors
Browse files Browse the repository at this point in the history
  • Loading branch information
anna-is-cute committed Sep 8, 2024
1 parent 706c067 commit c5a294f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Util/FileHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ internal static void CreateHardLink(string source, string destination) {

var error = Marshal.GetLastWin32Error();
var hresult = unchecked((int) (0x80070000 | (error & 0xFFFF)));
if (error == 1) {
if (error is 1 or 0x1F) {
throw new InvalidOperationException($"The file system does not support hard links ({source} -> {destination})") {
HResult = hresult,
};
Expand Down

0 comments on commit c5a294f

Please sign in to comment.