Skip to content

Commit

Permalink
Possible fix to HasWritePermissionAt throwing on OSX
Browse files Browse the repository at this point in the history
  • Loading branch information
Kaoticz committed May 23, 2024
1 parent 7969ba1 commit b54d197
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Kotz.Extensions/KotzUtilities.cs
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ public static bool HasWritePermissionAt(ReadOnlySpan<char> directoryUri)
using var fileStream = File.Create(tempFileUri);
return true;
}
catch (UnauthorizedAccessException)
catch (Exception ex) when (ex is not PathTooLongException and not DirectoryNotFoundException)
{
return false;
}
Expand Down

0 comments on commit b54d197

Please # to comment.