pull in Win32-extras, to be able to get current process id in Windows

Fixed up a number of things that had worked around there not being a way to
get that.

Most notably, transfer info files on windows now include the process id,
since no locking is currently done. This means the file format varies
between windows and unix.
This commit is contained in:
Joey Hess 2013-12-11 00:15:10 -04:00
parent c01af6285f
commit 011b8bc7ec
6 changed files with 46 additions and 19 deletions

View file

@ -23,7 +23,7 @@ import qualified Data.Map as M
#ifndef mingw32_HOST_OS
import System.Posix.Process (getProcessID)
#else
import System.Random (getStdRandom, random)
import System.Win32.Process.Current (getCurrentProcessId)
#endif
import Common.Annex
@ -243,7 +243,7 @@ withRsyncScratchDir a = do
#ifndef mingw32_HOST_OS
v <- liftIO getProcessID
#else
v <- liftIO (getStdRandom random :: IO Int)
v <- liftIO getCurrentProcessId
#endif
t <- fromRepo gitAnnexTmpDir
createAnnexDirectory t