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:
parent
c01af6285f
commit
011b8bc7ec
6 changed files with 46 additions and 19 deletions
|
@ -38,7 +38,7 @@ import GitAnnex.Options hiding (fromOption)
|
|||
#ifndef mingw32_HOST_OS
|
||||
import System.Posix.Process (getProcessID)
|
||||
#else
|
||||
import System.Random (getStdRandom, random)
|
||||
import System.Win32.Process.Current (getCurrentProcessId)
|
||||
#endif
|
||||
import Data.Time.Clock.POSIX
|
||||
import Data.Time
|
||||
|
@ -154,7 +154,7 @@ performRemote key file backend numcopies remote =
|
|||
#ifndef mingw32_HOST_OS
|
||||
v <- liftIO getProcessID
|
||||
#else
|
||||
v <- liftIO (getStdRandom random :: IO Int)
|
||||
v <- liftIO getCurrentProcessId
|
||||
#endif
|
||||
t <- fromRepo gitAnnexTmpDir
|
||||
createAnnexDirectory t
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue