diff options
Diffstat (limited to 'Remote')
-rw-r--r-- | Remote/Directory.hs | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/Remote/Directory.hs b/Remote/Directory.hs index 9705d5843..5cdb89f33 100644 --- a/Remote/Directory.hs +++ b/Remote/Directory.hs @@ -110,8 +110,10 @@ storeHelper d key a = do return ok retrieve :: FilePath -> Key -> Bool -> FilePath -> Annex Bool -retrieve d k _ f = do - liftIO $ withStoredFile d k $ \file -> copyFileExternal file f +retrieve d k tmp f = liftIO $ withStoredFile d k $ \file -> + if tmp + then catchBoolIO $ createSymbolicLink file f >> return True + else copyFileExternal file f retrieveEncrypted :: FilePath -> (Cipher, Key) -> FilePath -> Annex Bool retrieveEncrypted d (cipher, enck) f = |