diff options
author | Sean Whitton <spwhitton@spwhitton.name> | 2020-01-02 18:07:10 +0000 |
---|---|---|
committer | Sean Whitton <spwhitton@spwhitton.name> | 2020-01-02 18:07:10 +0000 |
commit | 1092316ba04116d7ae1d4cdf347804feacef768a (patch) | |
tree | fbc819794d4202a4ac778f0f6be57eedef7518dd /Utility/PosixFiles.hs | |
parent | d1e0531dd8e8b842349421a898b74b212d2157e8 (diff) | |
parent | 50a5a7b101cc9c30a5a04b4c20cbf7f99fcab0ef (diff) | |
download | git-repair-1092316ba04116d7ae1d4cdf347804feacef768a.tar.gz |
Merge tag '1.20200102'
tagging package git-repair version 1.20200102
Diffstat (limited to 'Utility/PosixFiles.hs')
-rw-r--r-- | Utility/PosixFiles.hs | 34 |
1 files changed, 0 insertions, 34 deletions
diff --git a/Utility/PosixFiles.hs b/Utility/PosixFiles.hs deleted file mode 100644 index 4550beb..0000000 --- a/Utility/PosixFiles.hs +++ /dev/null @@ -1,34 +0,0 @@ -{- POSIX files (and compatablity wrappers). - - - - This is like System.PosixCompat.Files, except with a fixed rename. - - - - Copyright 2014 Joey Hess <id@joeyh.name> - - - - License: BSD-2-clause - -} - -{-# LANGUAGE CPP #-} -{-# OPTIONS_GHC -fno-warn-tabs #-} - -module Utility.PosixFiles ( - module X, - rename -) where - -import System.PosixCompat.Files as X hiding (rename) - -#ifndef mingw32_HOST_OS -import System.Posix.Files (rename) -#else -import qualified System.Win32.File as Win32 -#endif - -{- System.PosixCompat.Files.rename on Windows calls renameFile, - - so cannot rename directories. - - - - Instead, use Win32 moveFile, which can. It needs to be told to overwrite - - any existing file. -} -#ifdef mingw32_HOST_OS -rename :: FilePath -> FilePath -> IO () -rename src dest = Win32.moveFileEx src dest Win32.mOVEFILE_REPLACE_EXISTING -#endif |