diff options
author | Joey Hess <joey@kitenet.net> | 2012-12-12 13:05:50 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2012-12-12 13:05:50 -0400 |
commit | 7674711070df6c445e72e7899ae2ec3836aeb6f6 (patch) | |
tree | c3b7f2a61e3af80fdafa62e53073e6603fcd50f3 /Annex/Content | |
parent | 95ae655c5ecad7d753539c60d3e16b47cd17346b (diff) |
make parent directory
Diffstat (limited to 'Annex/Content')
-rw-r--r-- | Annex/Content/Direct.hs | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/Annex/Content/Direct.hs b/Annex/Content/Direct.hs index 99b54f7e0..265195b87 100644 --- a/Annex/Content/Direct.hs +++ b/Annex/Content/Direct.hs @@ -109,8 +109,10 @@ compareCache file old = do {- Stores a cache of attributes for a file that is associated with a key. -} updateCache :: Key -> FilePath -> Annex () -updateCache key file = withCacheFile key $ \cachefile -> - maybe noop (writeFile cachefile . showCache) =<< genCache file +updateCache key file = do + withCacheFile key $ \cachefile -> do + createDirectoryIfMissing True (parentDir cachefile) + maybe noop (writeFile cachefile . showCache) =<< genCache file {- Removes a cache. -} removeCache :: Key -> Annex () |