From 07e849757ea41979914cb31ea43d21caef1d8957 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Fri, 9 Jan 2015 14:26:52 -0400 Subject: convert parentDir to be based on takeDirectory, but fixed for trailing / --- Annex/Direct.hs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'Annex/Direct.hs') 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 -- cgit v1.2.3