diff options
Diffstat (limited to 'Annex/Perms.hs')
-rw-r--r-- | Annex/Perms.hs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/Annex/Perms.hs b/Annex/Perms.hs index 3430554c7..d314e382c 100644 --- a/Annex/Perms.hs +++ b/Annex/Perms.hs @@ -71,12 +71,12 @@ annexFileMode = withShared $ return . go createAnnexDirectory :: FilePath -> Annex () createAnnexDirectory dir = traverse dir [] =<< top where - top = parentDir <$> fromRepo gitAnnexDir + top = takeDirectory <$> fromRepo gitAnnexDir traverse d below stop | d `equalFilePath` stop = done | otherwise = ifM (liftIO $ doesDirectoryExist d) ( done - , traverse (parentDir d) (d:below) stop + , traverse (takeDirectory d) (d:below) stop ) where done = forM_ below $ \p -> do @@ -92,14 +92,14 @@ freezeContentDir :: FilePath -> Annex () freezeContentDir file = unlessM crippledFileSystem $ liftIO . go =<< fromRepo getSharedRepository where - dir = parentDir file + dir = takeDirectory file go GroupShared = groupWriteRead dir go AllShared = groupWriteRead dir go _ = preventWrite dir thawContentDir :: FilePath -> Annex () thawContentDir file = unlessM crippledFileSystem $ - liftIO $ allowWrite $ parentDir file + liftIO $ allowWrite $ takeDirectory file {- Makes the directory tree to store an annexed file's content, - with appropriate permissions on each level. -} @@ -111,7 +111,7 @@ createContentDir dest = do unlessM crippledFileSystem $ liftIO $ allowWrite dir where - dir = parentDir dest + dir = takeDirectory dest {- Creates the content directory for a file if it doesn't already exist, - or thaws it if it does, then runs an action to modify the file, and |