Improve display of errors when transfers fail

Transfers from or to a local git repo could fail without a reason being
given, if the content failed to verify, or if the object file's stat
changed while it was being copied. Now display messages in these cases.

Sponsored-by: Jack Hill on Patreon
This commit is contained in:
Joey Hess 2021-06-25 13:04:17 -04:00
parent f5595ea063
commit df2001aa88
No known key found for this signature in database
GPG key ID: DB12DB0FF05F8F38
5 changed files with 63 additions and 15 deletions

View file

@ -113,7 +113,9 @@ fileCopier copycowtried src dest k meterupdate check verifyconfig =
( case iv of
Just x -> ifM (liftIO $ finalizeIncremental x)
( return (True, Verified)
, return (False, UnVerified)
, do
warning "verification of content failed"
return (False, UnVerified)
)
Nothing -> return (True, UnVerified)
, return (False, UnVerified)