From 81d4be1d707669b5c83f678dc3a0869159754362 Mon Sep 17 00:00:00 2001 From: Julian Ospald Date: Mon, 20 May 2024 10:13:37 +0800 Subject: [PATCH] Do not create non-existing files when copying Fixes https://github.com/haskell/directory/issues/177 --- System/Directory/Internal/Windows.hsc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/System/Directory/Internal/Windows.hsc b/System/Directory/Internal/Windows.hsc index 1b7c5295..8c55861c 100644 --- a/System/Directory/Internal/Windows.hsc +++ b/System/Directory/Internal/Windows.hsc @@ -113,7 +113,7 @@ openFileForRead (OsString path) = Win32.gENERIC_READ maxShareMode Nothing - Win32.oPEN_ALWAYS + Win32.oPEN_EXISTING (Win32.fILE_ATTRIBUTE_NORMAL .|. possiblyOverlapped) Nothing) Win32.closeHandle