diff options
author | Joey Hess <joeyh@joeyh.name> | 2018-01-02 16:25:27 -0400 |
---|---|---|
committer | Joey Hess <joeyh@joeyh.name> | 2018-01-02 16:25:27 -0400 |
commit | 97ec39db6b3b1b3c8d018786264ab6c625a7b018 (patch) | |
tree | 2356359e5d6504ed130b2a39afb26c9babe8be79 /Logs | |
parent | db0d0ecae7b8d460c05e310c7fa1d84721e0c426 (diff) |
unused: Write .git/annex/unused etc files with appropriate permissions for the core.sharedRepository config.
This commit was sponsored by an anonymous bitcoin donor.
Diffstat (limited to 'Logs')
-rw-r--r-- | Logs/Unused.hs | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/Logs/Unused.hs b/Logs/Unused.hs index a2f40410b..076245591 100644 --- a/Logs/Unused.hs +++ b/Logs/Unused.hs @@ -33,6 +33,7 @@ import Data.Time import Annex.Common import qualified Annex +import Annex.Perms import Utility.Tmp import Logs.TimeStamp @@ -64,10 +65,13 @@ updateUnusedLog prefix m = do writeUnusedLog :: FilePath -> UnusedLog -> Annex () writeUnusedLog prefix l = do logfile <- fromRepo $ gitAnnexUnusedLog prefix - liftIO $ viaTmp writeFile logfile $ unlines $ map format $ M.toList l + viaTmp writelog logfile $ unlines $ map format $ M.toList l where format (k, (i, Just t)) = show i ++ " " ++ key2file k ++ " " ++ show t format (k, (i, Nothing)) = show i ++ " " ++ key2file k + writelog f c = do + liftIO $ writeFile f c + setAnnexFilePerm f readUnusedLog :: FilePath -> Annex UnusedLog readUnusedLog prefix = do |