cleanup
This commit is contained in:
parent
00988bcf36
commit
3d2a9f8405
11 changed files with 48 additions and 54 deletions
|
@ -56,11 +56,7 @@ perform file oldkey newbackend = do
|
|||
case k of
|
||||
Nothing -> stop
|
||||
Just (newkey, _) -> do
|
||||
ok <- getViaTmpUnchecked newkey $ \t -> do
|
||||
-- Make a hard link to the old backend's
|
||||
-- cached key, to avoid wasting disk space.
|
||||
liftIO $ unlessM (doesFileExist t) $ createLink src t
|
||||
return True
|
||||
ok <- link src newkey
|
||||
if ok
|
||||
then do
|
||||
-- Update symlink to use the new key.
|
||||
|
@ -77,3 +73,8 @@ perform file oldkey newbackend = do
|
|||
else stop
|
||||
where
|
||||
cleantmp t = whenM (doesFileExist t) $ removeFile t
|
||||
link src newkey = getViaTmpUnchecked newkey $ \t -> do
|
||||
-- Make a hard link to the old backend's
|
||||
-- cached key, to avoid wasting disk space.
|
||||
liftIO $ unlessM (doesFileExist t) $ createLink src t
|
||||
return True
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue