aboutsummaryrefslogtreecommitdiff
path: root/Logs/Transfer.hs
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2014-08-20 17:03:04 -0400
committerGravatar Joey Hess <joey@kitenet.net>2014-08-20 17:03:04 -0400
commit7165e4035e9b6cfeaa5d659341749cc957b27e14 (patch)
treed78cfbd2483336adb49e82de82efe27c3fc53e7d /Logs/Transfer.hs
parent679d9c0027ac996eea9f41a6f0f39af436801e89 (diff)
more lock file refactoring
Diffstat (limited to 'Logs/Transfer.hs')
-rw-r--r--Logs/Transfer.hs8
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