diff options
author | Joey Hess <joeyh@joeyh.name> | 2015-07-30 13:29:45 -0400 |
---|---|---|
committer | Joey Hess <joeyh@joeyh.name> | 2015-07-30 13:29:45 -0400 |
commit | cc32ffe05f5b8453ac09f2a12b2a17e41d9d7584 (patch) | |
tree | 8f47d587634e012f56dba8ce62eb61997e68eb83 /Remote/Rsync.hs | |
parent | 383d7c247ef97164fd15e4baa89c6d8f15f89537 (diff) |
Fix rsync special remote to work when -Jn is used for concurrent uploads.
Diffstat (limited to 'Remote/Rsync.hs')
-rw-r--r-- | Remote/Rsync.hs | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/Remote/Rsync.hs b/Remote/Rsync.hs index 3986863b3..b9cdc458e 100644 --- a/Remote/Rsync.hs +++ b/Remote/Rsync.hs @@ -39,6 +39,7 @@ import Logs.Transfer import Types.Creds import Types.Key (isChunkKey) import Annex.DirHashes +import Utility.Tmp import qualified Data.Map as M @@ -252,16 +253,8 @@ sendParams = ifM crippledFileSystem - up trees for rsync. -} withRsyncScratchDir :: (FilePath -> Annex a) -> Annex a withRsyncScratchDir a = do - p <- liftIO getPID t <- fromRepo gitAnnexTmpObjectDir - createAnnexDirectory t - let tmp = t </> "rsynctmp" </> show p - nuke tmp - liftIO $ createDirectoryIfMissing True tmp - nuke tmp `after` a tmp - where - nuke d = liftIO $ whenM (doesDirectoryExist d) $ - removeDirectoryRecursive d + withTmpDirIn t "rsynctmp" a rsyncRetrieve :: RsyncOpts -> Key -> FilePath -> Maybe MeterUpdate -> Annex Bool rsyncRetrieve o k dest meterupdate = |