summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2012-02-16 22:38:08 -0400
committerGravatar Joey Hess <joey@kitenet.net>2012-02-16 22:38:08 -0400
commitba5515d4226a47bc89ad141bd8029a4f252ad28d (patch)
tree3779538caa0d3636c31164fe9de0567806e01260
parent156a631f63eb0b2cee6a1b223d8e12ff8c62cb16 (diff)
reorder for clarity
-rw-r--r--Command/ReKey.hs5
1 files changed, 2 insertions, 3 deletions
diff --git a/Command/ReKey.hs b/Command/ReKey.hs
index 644e84382..2bd4541c6 100644
--- a/Command/ReKey.hs
+++ b/Command/ReKey.hs
@@ -53,13 +53,12 @@ linkKey oldkey newkey = getViaTmpUnchecked newkey $ \t -> do
cleanup :: FilePath -> Key -> Key -> CommandCleanup
cleanup file oldkey newkey = do
- -- Update symlink to use the new key.
- liftIO $ removeFile file
-
-- If the old key had some associated urls, record them for
-- the new key as well.
urls <- getUrls oldkey
unless (null urls) $
mapM_ (setUrlPresent newkey) urls
+ -- Update symlink to use the new key.
+ liftIO $ removeFile file
Command.Add.cleanup file newkey True