fix error message when content to export is not locally available

This commit is contained in:
Joey Hess 2017-08-31 12:37:25 -04:00
parent efe3910c04
commit 4694e49158
No known key found for this signature in database
GPG key ID: DB12DB0FF05F8F38

View file

@ -16,6 +16,7 @@ import Types.Key
import Types.Remote import Types.Remote
import Annex.Content import Annex.Content
import Annex.CatFile import Annex.CatFile
import Logs.Location
import Messages.Progress import Messages.Progress
import Utility.Tmp import Utility.Tmp
@ -69,10 +70,15 @@ performExport r diff loc = case storeExport r of
Just storer -> next $ do Just storer -> next $ do
v <- exportKey (Git.DiffTree.dstsha diff) v <- exportKey (Git.DiffTree.dstsha diff)
case v of case v of
Right k -> metered Nothing k $ \m -> Right k -> ifM (inAnnex k)
sendAnnex k ( metered Nothing k $ \m ->
(void $ performUnexport r k loc) sendAnnex k
(\f -> storer f k loc m) (void $ performUnexport r k loc)
(\f -> storer f k loc m)
, do
showNote "not available"
return False
)
-- Sending a non-annexed file. -- Sending a non-annexed file.
Left sha1k -> metered Nothing sha1k $ \m -> Left sha1k -> metered Nothing sha1k $ \m ->
withTmpFile "export" $ \tmp h -> do withTmpFile "export" $ \tmp h -> do