diff options
-rw-r--r-- | Annex/Direct.hs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Annex/Direct.hs b/Annex/Direct.hs index 71ba4b41e..f43c94fcb 100644 --- a/Annex/Direct.hs +++ b/Annex/Direct.hs @@ -172,8 +172,8 @@ toDirectGen :: Key -> FilePath -> Annex (Maybe (Annex ())) toDirectGen k f = do loc <- inRepo $ gitAnnexLocation k createContentDir loc -- thaws directory too - top <- fromRepo Git.repoPath - locs <- filter (/= normalise (top </> f)) <$> addAssociatedFile k f + absf <- liftIO $ absPath f + locs <- filter (/= absf) <$> addAssociatedFile k f case locs of [] -> ifM (liftIO $ doesFileExist loc) ( return $ Just $ do @@ -183,7 +183,7 @@ toDirectGen k f = do liftIO $ replaceFile f $ moveFile loc , return Nothing ) - (loc':_) -> ifM (liftIO $ not . isSymbolicLink <$> getSymbolicLinkStatus loc') + (loc':_) -> ifM (liftIO $ catchBoolIO $ not . isSymbolicLink <$> getSymbolicLinkStatus loc') {- Another direct file has the content; copy it. -} ( return $ Just $ do liftIO $ replaceFile f $ |