diff options
Diffstat (limited to 'Logs/Transfer.hs')
-rw-r--r-- | Logs/Transfer.hs | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/Logs/Transfer.hs b/Logs/Transfer.hs index b6279ccba..7928972b3 100644 --- a/Logs/Transfer.hs +++ b/Logs/Transfer.hs @@ -17,9 +17,7 @@ import Utility.Metered import Utility.Percentage import Utility.QuickCheck import Utility.PID -#ifdef mingw32_HOST_OS -import Utility.WinLock -#endif +import Utility.LockFile import Data.Time.Clock import Data.Time.Clock.POSIX @@ -131,9 +129,7 @@ checkTransfer :: Transfer -> Annex (Maybe TransferInfo) checkTransfer t = do tfile <- fromRepo $ transferFile t #ifndef mingw32_HOST_OS - mode <- annexFileMode - mfd <- liftIO $ catchMaybeIO $ - openFd (transferLockFile tfile) ReadOnly (Just mode) defaultFileFlags + mfd <- liftIO $ openExistingLockFile (transferLockFile tfile) case mfd of Nothing -> return Nothing -- failed to open file; not running Just fd -> do |