summaryrefslogtreecommitdiff
path: root/Annex
diff options
context:
space:
mode:
Diffstat (limited to 'Annex')
-rw-r--r--Annex/Direct.hs8
1 files changed, 4 insertions, 4 deletions
diff --git a/Annex/Direct.hs b/Annex/Direct.hs
index 15eb04060..df1c8f239 100644
--- a/Annex/Direct.hs
+++ b/Annex/Direct.hs
@@ -308,10 +308,10 @@ preserveUnannexed item makeabs absf oldref = do
liftIO $ findnewname absf 0
checkdirs (DiffTree.file item)
where
- checkdirs from = do
- let p = parentDir (getTopFilePath from)
- let d = asTopFilePath p
- unless (null p) $ do
+ checkdirs from = case upFrom (getTopFilePath from) of
+ Nothing -> noop
+ Just p -> do
+ let d = asTopFilePath p
let absd = makeabs d
whenM (liftIO (colliding_nondir absd) <&&> unannexed absd) $
liftIO $ findnewname absd 0