aboutsummaryrefslogtreecommitdiff
path: root/rhodecode
diff options
context:
space:
mode:
authorMarcin Kuzminski <marcin@python-works.com>2010-10-06 11:27:41 +0200
committerMarcin Kuzminski <marcin@python-works.com>2010-10-06 11:27:41 +0200
commitce16f44c9853eea8f096625c9c2106509b261069 (patch)
treee486fb4430b31075b5c4b116ac90d05f1e91cb16 /rhodecode
parent546ee875b309e689afa705e80be0aea482b8379b (diff)
fixed creation of cache data dir, on first run
Diffstat (limited to 'rhodecode')
-rw-r--r--rhodecode/model/meta.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/rhodecode/model/meta.py b/rhodecode/model/meta.py
index b6c99279..3ec82988 100644
--- a/rhodecode/model/meta.py
+++ b/rhodecode/model/meta.py
@@ -28,7 +28,12 @@ Base = declarative_base()
#===============================================================================
# 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