OsPath transition Windows build fixes
This gets it building on Windows again, with 1 test suite failure (addurl). Sponsored-by: Kevin Mueller
This commit is contained in:
parent
9dc43396b3
commit
a149336a59
23 changed files with 58 additions and 62 deletions
|
@ -21,11 +21,12 @@ import Control.Concurrent
|
|||
|
||||
import Utility.Path.Windows
|
||||
import Utility.FileSystemEncoding
|
||||
import Utility.OsPath
|
||||
#if MIN_VERSION_Win32(2,13,4)
|
||||
import Common (tryNonAsync)
|
||||
#endif
|
||||
|
||||
type LockFile = RawFilePath
|
||||
type LockFile = OsPath
|
||||
|
||||
type LockHandle = HANDLE
|
||||
|
||||
|
@ -60,7 +61,7 @@ lockExclusive = openLock fILE_SHARE_NONE
|
|||
-}
|
||||
openLock :: ShareMode -> LockFile -> IO (Maybe LockHandle)
|
||||
openLock sharemode f = do
|
||||
f' <- convertToWindowsNativeNamespace f
|
||||
f' <- convertToWindowsNativeNamespace (fromOsPath f)
|
||||
#if MIN_VERSION_Win32(2,13,4)
|
||||
r <- tryNonAsync $ createFile_NoRetry (fromRawFilePath f') gENERIC_READ sharemode
|
||||
Nothing oPEN_ALWAYS fILE_ATTRIBUTE_NORMAL
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue