summaryrefslogtreecommitdiff
path: root/Command/Unlock.hs
diff options
context:
space:
mode:
authorGravatar Joey Hess <joeyh@joeyh.name>2016-10-17 15:19:47 -0400
committerGravatar Joey Hess <joeyh@joeyh.name>2016-10-17 15:19:47 -0400
commitee7c5c8636e0478746b72e9900811b3a63c450cc (patch)
tree0fc96bf1d5e01584e9fede3ea44080d76cc3b205 /Command/Unlock.hs
parent697bb401dbb2a9497e8e3cbc895052ad87a75c23 (diff)
upgrade: Handle upgrade to v6 when the repository already contains v6 unlocked files whose content is already present.
Closes https://github.com/datalad/datalad/issues/1020 The use of runWriter in scanUnlockedFiles broke due to this change; it failed with blocked indefinitely in mvar, because the database write handle was taken while linkFromAnnex needed to also write to it (to update the inode cache). So, switched to using a separate runWriter for each call to addAssociatedFileFast. A little less efficient, but not greatly; the writes should all still be cached.
Diffstat (limited to 'Command/Unlock.hs')
-rw-r--r--Command/Unlock.hs2
1 files changed, 1 insertions, 1 deletions
diff --git a/Command/Unlock.hs b/Command/Unlock.hs
index dfd8350f1..0ac221c1f 100644
--- a/Command/Unlock.hs
+++ b/Command/Unlock.hs
@@ -56,7 +56,7 @@ performNew dest key = do
case r of
LinkAnnexOk -> return ()
LinkAnnexNoop -> return ()
- _ -> error "unlock failed"
+ LinkAnnexFailed -> error "unlock failed"
, liftIO $ writePointerFile tmp key destmode
)
next $ cleanupNew dest key destmode