We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 3966807 commit a2c80edCopy full SHA for a2c80ed
1 file changed
src/FileSystem/File.cs
@@ -44,16 +44,15 @@ public static class File
44
fullPath,
45
FileMode.Open,
46
FileAccess.Read,
47
- FileShare.None,
+ FileShare.Read, // Allow other processes to read the file while we compute the hash
48
MEGABYTE))
49
{
50
var hash = hashAlgorithm.ComputeHash(stream);
51
return BitConverter.ToString(hash).Replace("-", "", StringComparison.OrdinalIgnoreCase);
52
}
53
54
55
- catch (Exception ex)
56
- when (ex is ArgumentException || ex is ArgumentNullException || ex is ObjectDisposedException || ex is System.Reflection.TargetInvocationException)
+ catch
57
58
return null;
59
0 commit comments