Skip to content

Commit 4fb3efe

Browse files
authored
Merge pull request #36 from joeyh/master
fix build with Win32-2.6.0
2 parents 0b2c5f2 + 806b33c commit 4fb3efe

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/System/PosixCompat/Files.hsc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -392,7 +392,11 @@ readSymbolicLink _ = unsupported "readSymbolicLink"
392392
-- Renaming
393393

394394
rename :: FilePath -> FilePath -> IO ()
395+
#if MIN_VERSION_Win32(2, 6, 0)
396+
rename name1 name2 = moveFileEx name1 (Just name2) mOVEFILE_REPLACE_EXISTING
397+
#else
395398
rename name1 name2 = moveFileEx name1 name2 mOVEFILE_REPLACE_EXISTING
399+
#endif
396400

397401
-- -----------------------------------------------------------------------------
398402
-- chown()

0 commit comments

Comments
 (0)