changeset 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 f99075170eb4
children f57aaf673743
files rhodecode/model/meta.py
diffstat 1 files changed, 6 insertions(+), 1 deletions(-) [+]
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