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:
parent
b7a5d9c3e1
commit
267f397d82
1 changed files with 4 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue