diff options
author | Joey Hess <joeyh@joeyh.name> | 2017-08-31 12:37:25 -0400 |
---|---|---|
committer | Joey Hess <joeyh@joeyh.name> | 2017-08-31 12:39:10 -0400 |
commit | 402d8ca3b29bfe500ebcbec82bc0d3b2168b6100 (patch) | |
tree | 5cc9585c4b91f45d66498b136b805ad616c9c3bf /Command | |
parent | a33e51e77174861e381296e5c2dbb8f740b9338c (diff) |
fix error message when content to export is not locally available
Diffstat (limited to 'Command')
-rw-r--r-- | Command/Export.hs | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/Command/Export.hs b/Command/Export.hs index 7de143ffb..a2632857a 100644 --- a/Command/Export.hs +++ b/Command/Export.hs @@ -16,6 +16,7 @@ import Types.Key import Types.Remote import Annex.Content import Annex.CatFile +import Logs.Location import Messages.Progress import Utility.Tmp @@ -69,10 +70,15 @@ performExport r diff loc = case storeExport r of Just storer -> next $ do v <- exportKey (Git.DiffTree.dstsha diff) case v of - Right k -> metered Nothing k $ \m -> - sendAnnex k - (void $ performUnexport r k loc) - (\f -> storer f k loc m) + Right k -> ifM (inAnnex k) + ( metered Nothing k $ \m -> + sendAnnex k + (void $ performUnexport r k loc) + (\f -> storer f k loc m) + , do + showNote "not available" + return False + ) -- Sending a non-annexed file. Left sha1k -> metered Nothing sha1k $ \m -> withTmpFile "export" $ \tmp h -> do |