optimize fsck --from directory special remote
No need to copy anything, just symlink to the file.
This commit is contained in:
parent
06b0cb6224
commit
71cb04bb6d
1 changed files with 4 additions and 2 deletions
|
@ -110,8 +110,10 @@ storeHelper d key a = do
|
||||||
return ok
|
return ok
|
||||||
|
|
||||||
retrieve :: FilePath -> Key -> Bool -> FilePath -> Annex Bool
|
retrieve :: FilePath -> Key -> Bool -> FilePath -> Annex Bool
|
||||||
retrieve d k _ f = do
|
retrieve d k tmp f = liftIO $ withStoredFile d k $ \file ->
|
||||||
liftIO $ withStoredFile d k $ \file -> copyFileExternal file f
|
if tmp
|
||||||
|
then catchBoolIO $ createSymbolicLink file f >> return True
|
||||||
|
else copyFileExternal file f
|
||||||
|
|
||||||
retrieveEncrypted :: FilePath -> (Cipher, Key) -> FilePath -> Annex Bool
|
retrieveEncrypted :: FilePath -> (Cipher, Key) -> FilePath -> Annex Bool
|
||||||
retrieveEncrypted d (cipher, enck) f =
|
retrieveEncrypted d (cipher, enck) f =
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue