summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Annex/WorkTree.hs7
1 files changed, 6 insertions, 1 deletions
diff --git a/Annex/WorkTree.hs b/Annex/WorkTree.hs
index 26144e7f9..c824e7fc5 100644
--- a/Annex/WorkTree.hs
+++ b/Annex/WorkTree.hs
@@ -10,6 +10,8 @@ module Annex.WorkTree where
import Common.Annex
import Annex.Link
import Annex.CatFile
+import Annex.Version
+import Config
{- Looks up the key corresponding to an annexed file,
- by examining what the file links to.
@@ -22,7 +24,10 @@ lookupFile file = do
mkey <- isAnnexLink file
case mkey of
Just key -> makeret key
- Nothing -> maybe (return Nothing) makeret =<< catKeyFile file
+ Nothing -> ifM (versionSupportsUnlockedPointers <||> isDirect)
+ ( maybe (return Nothing) makeret =<< catKeyFile file
+ , return Nothing
+ )
where
makeret = return . Just