We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent fec43a0 commit 12f32a3Copy full SHA for 12f32a3
src/Files.Uwp/Helpers/NativeFileOperationsHelper.cs
@@ -85,7 +85,7 @@ public static SafeFileHandle CreateFileForWrite(string filePath, bool overwrite
85
public static SafeFileHandle OpenFileForRead(string filePath, bool readWrite = false, uint flags = 0)
86
{
87
return new SafeFileHandle(CreateFileFromApp(filePath,
88
- GENERIC_READ | (readWrite ? GENERIC_WRITE : 0), FILE_SHARE_READ | FILE_SHARE_WRITE, IntPtr.Zero, OPEN_ALWAYS, (uint)File_Attributes.BackupSemantics | flags, IntPtr.Zero), true);
+ GENERIC_READ | (readWrite ? GENERIC_WRITE : 0), FILE_SHARE_READ | (readWrite ? 0 :FILE_SHARE_WRITE), IntPtr.Zero, OPEN_EXISTING, (uint)File_Attributes.BackupSemantics | flags, IntPtr.Zero), true);
89
}
90
91
private const int MAXIMUM_REPARSE_DATA_BUFFER_SIZE = 16 * 1024;
0 commit comments