summaryrefslogtreecommitdiff
path: root/Annex/Direct.hs
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2013-01-18 12:20:08 -0400
committerGravatar Joey Hess <joey@kitenet.net>2013-01-18 12:20:08 -0400
commit72445900116cfce9daa8841097096db3b64a3b16 (patch)
tree257034c1124155dbe77ee5d800c38c3b4bd927d3 /Annex/Direct.hs
parentc327bfbe6d90643a0d1fd714d4e1b2d826243ede (diff)
Fix direct mode mapping code to always store direct mode filenames relative to the top of the repository, even when operating inside a subdirectory.
Diffstat (limited to 'Annex/Direct.hs')
-rw-r--r--Annex/Direct.hs3
1 files changed, 2 insertions, 1 deletions
diff --git a/Annex/Direct.hs b/Annex/Direct.hs
index e0d3f9d79..71ba4b41e 100644
--- a/Annex/Direct.hs
+++ b/Annex/Direct.hs
@@ -172,7 +172,8 @@ toDirectGen :: Key -> FilePath -> Annex (Maybe (Annex ()))
toDirectGen k f = do
loc <- inRepo $ gitAnnexLocation k
createContentDir loc -- thaws directory too
- locs <- filter (/= normalise f) <$> addAssociatedFile k f
+ top <- fromRepo Git.repoPath
+ locs <- filter (/= normalise (top </> f)) <$> addAssociatedFile k f
case locs of
[] -> ifM (liftIO $ doesFileExist loc)
( return $ Just $ do