diff options
author | Joey Hess <joeyh@joeyh.name> | 2015-01-09 14:26:52 -0400 |
---|---|---|
committer | Joey Hess <joeyh@joeyh.name> | 2015-01-09 14:26:52 -0400 |
commit | 07e849757ea41979914cb31ea43d21caef1d8957 (patch) | |
tree | ddfa1157029cfbbe3868485e3aa325e5158c9626 /Annex | |
parent | 425bc1107aebdb701cdcee44da731dd918cd470d (diff) |
convert parentDir to be based on takeDirectory, but fixed for trailing /
Diffstat (limited to 'Annex')
-rw-r--r-- | Annex/Direct.hs | 8 |
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 |