summaryrefslogtreecommitdiff
path: root/Command
diff options
context:
space:
mode:
authorGravatar Joey Hess <joeyh@joeyh.name>2017-09-06 15:59:02 -0400
committerGravatar Joey Hess <joeyh@joeyh.name>2017-09-06 15:59:02 -0400
commitf69b019a04bbad2061ea3cfd069b502cdbcc8871 (patch)
treef01deaaaf58d428a8957c7b9b8eb028b24fbf386 /Command
parent455a3b04f63dd52eb52f6a95967ca2e59905eea4 (diff)
bugfix
Diffstat (limited to 'Command')
-rw-r--r--Command/Export.hs7
1 files changed, 4 insertions, 3 deletions
diff --git a/Command/Export.hs b/Command/Export.hs
index 6090b2603..d397b2def 100644
--- a/Command/Export.hs
+++ b/Command/Export.hs
@@ -49,6 +49,7 @@ optParser _ = ExportOptions
-- An export includes both annexed files and files stored in git.
-- For the latter, a SHA1 key is synthesized.
data ExportKey = AnnexKey Key | GitKey Key
+ deriving (Show)
asKey :: ExportKey -> Key
asKey (AnnexKey k) = k
@@ -108,7 +109,7 @@ seek o = do
oldtreesha new
-- Rename from temp to new files.
mapdiff (\diff -> startMoveFromTempName r db (Git.DiffTree.dstsha diff) (Git.DiffTree.file diff))
- new oldtreesha
+ oldtreesha new
-- Remove all remaining temps.
mapdiff
(startUnexportTempName r db . Git.DiffTree.srcsha)
@@ -252,8 +253,8 @@ startMoveFromTempName r db sha f
| sha == nullSha = stop
| otherwise = do
ek <- exportKey sha
- stopUnless (liftIO $ elem loc <$> getExportLocation db (asKey ek)) $ do
- let tmploc@(ExportLocation tmpf) = exportTempName ek
+ let tmploc@(ExportLocation tmpf) = exportTempName ek
+ stopUnless (liftIO $ elem tmploc <$> getExportLocation db (asKey ek)) $ do
showStart "rename" (tmpf ++ " -> " ++ f')
next $ performRename r db ek tmploc loc
where