avoid calling copy when file DNE

This avoids an ugly warning when running git annex fsck --from a rsync
remote in a repo in direct mode.
This commit is contained in:
Joey Hess 2015-07-30 13:40:17 -04:00
parent b7a5d9c3e1
commit 267f397d82

View file

@ -611,7 +611,10 @@ preseedTmp key file = go =<< inAnnex key
( return True
, do
s <- calcRepo $ gitAnnexLocation key
liftIO $ copyFileExternal CopyTimeStamps s file
liftIO $ ifM (doesFileExist s)
( copyFileExternal CopyTimeStamps s file
, return False
)
)
{- Blocks writing to an annexed file, and modifies file permissions to