diff options
Diffstat (limited to 'Remote/Rsync.hs')
-rw-r--r-- | Remote/Rsync.hs | 17 |
1 files changed, 4 insertions, 13 deletions
diff --git a/Remote/Rsync.hs b/Remote/Rsync.hs index f7abbbf2a..228a66d51 100644 --- a/Remote/Rsync.hs +++ b/Remote/Rsync.hs @@ -264,7 +264,7 @@ rsyncRemote o callback params = do - - This would not be necessary if the hash directory structure used locally - was always the same as that used on the rsync remote. So if that's ever - - unified, this gets nicer. Especially in the crippled filesystem case. + - unified, this gets nicer. - (When we have the right hash directory structure, we can just - pass --include=X --include=X/Y --include=X/Y/file --exclude=*) -} @@ -272,20 +272,11 @@ rsyncSend :: RsyncOpts -> MeterUpdate -> Key -> Bool -> FilePath -> Annex Bool rsyncSend o callback k canrename src = withRsyncScratchDir $ \tmp -> do let dest = tmp </> Prelude.head (keyPaths k) liftIO $ createDirectoryIfMissing True $ parentDir dest - ok <- if canrename + ok <- liftIO $ if canrename then do - liftIO $ renameFile src dest + renameFile src dest return True - else ifM crippledFileSystem - ( liftIO $ copyFileExternal src dest - , do -#ifndef __WINDOWS__ - liftIO $ createLink src dest - return True -#else - liftIO $ copyFileExternal src dest -#endif - ) + else createLinkOrCopy src dest ps <- sendParams if ok then rsyncRemote o (Just callback) $ ps ++ |