reorder for clarity
This commit is contained in:
parent
156a631f63
commit
ba5515d422
1 changed files with 2 additions and 3 deletions
|
@ -53,13 +53,12 @@ linkKey oldkey newkey = getViaTmpUnchecked newkey $ \t -> do
|
||||||
|
|
||||||
cleanup :: FilePath -> Key -> Key -> CommandCleanup
|
cleanup :: FilePath -> Key -> Key -> CommandCleanup
|
||||||
cleanup file oldkey newkey = do
|
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
|
-- If the old key had some associated urls, record them for
|
||||||
-- the new key as well.
|
-- the new key as well.
|
||||||
urls <- getUrls oldkey
|
urls <- getUrls oldkey
|
||||||
unless (null urls) $
|
unless (null urls) $
|
||||||
mapM_ (setUrlPresent newkey) urls
|
mapM_ (setUrlPresent newkey) urls
|
||||||
|
|
||||||
|
-- Update symlink to use the new key.
|
||||||
|
liftIO $ removeFile file
|
||||||
Command.Add.cleanup file newkey True
|
Command.Add.cleanup file newkey True
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue