summaryrefslogtreecommitdiff
path: root/Annex/Direct.hs
diff options
context:
space:
mode:
Diffstat (limited to 'Annex/Direct.hs')
-rw-r--r--Annex/Direct.hs7
1 files changed, 4 insertions, 3 deletions
diff --git a/Annex/Direct.hs b/Annex/Direct.hs
index 7836ceb96..e3779adc8 100644
--- a/Annex/Direct.hs
+++ b/Annex/Direct.hs
@@ -89,7 +89,8 @@ addDirect file cache = do
return False
got (Just (key, _)) = ifM (sameInodeCache file $ Just cache)
( do
- stageSymlink file =<< hashSymlink =<< calcGitLink file key
+ l <- inRepo $ gitAnnexLink file key
+ stageSymlink file =<< hashSymlink l
writeInodeCache key cache
void $ addAssociatedFile key file
logStatus key InfoPresent
@@ -152,7 +153,7 @@ mergeDirectCleanup d oldsha newsha = do
-
- Symlinks are replaced with their content, if it's available. -}
movein k f = do
- l <- calcGitLink f k
+ l <- inRepo $ gitAnnexLink f k
replaceFile f $ makeAnnexLink l
toDirect k f
@@ -169,7 +170,7 @@ toDirect k f = fromMaybe noop =<< toDirectGen k f
toDirectGen :: Key -> FilePath -> Annex (Maybe (Annex ()))
toDirectGen k f = do
- loc <- inRepo $ gitAnnexLocation k
+ loc <- calcRepo $ gitAnnexLocation k
absf <- liftIO $ absPath f
locs <- filter (/= absf) <$> addAssociatedFile k f
case locs of