Mercurial > kallithea
diff rhodecode/model/meta.py @ 550:342f8434ed14
fixed creation of cache data dir, on first run
author | Marcin Kuzminski <marcin@python-works.com> |
---|---|
date | Wed, 06 Oct 2010 11:27:41 +0200 |
parents | 1e757ac98988 |
children | 0a48c1ec04fc c1c1cf772337 |
line wrap: on
line diff
--- a/rhodecode/model/meta.py Wed Oct 06 03:34:18 2010 +0200 +++ b/rhodecode/model/meta.py Wed Oct 06 11:27:41 2010 +0200 @@ -28,7 +28,12 @@ #=============================================================================== # CACHE OPTIONS #=============================================================================== -cache_dir = jn(dn(dn(dn(abspath(__file__)))), 'data', 'cache') +cache_base = jn(dn(dn(dn(abspath(__file__)))), 'data') +cache_dir = jn(cache_base, 'cache') + +if not os.path.isdir(cache_base): + os.mkdir(cache_base) + if not os.path.isdir(cache_dir): os.mkdir(cache_dir) # set start_time to current time