File: cache_location.dpatch

package info (click to toggle)
nodebox-web 1.9.2-2
  • links: PTS
  • area: main
  • in suites: lenny
  • size: 1,724 kB
  • ctags: 1,254
  • sloc: python: 6,161; sh: 602; xml: 239; makefile: 33
file content (29 lines) | stat: -rw-r--r-- 779 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#! /bin/sh /usr/share/dpatch/dpatch-run
## 00_cache_location.dpatch by  <serzan@hellug.gr>
##
## All lines beginning with `## DP:' are a description of the patch.
## DP: store cache in ~/.nodebox-web-cache

@DPATCH@

--- nodebox-web-1.9.2/cache.py	2007-07-25 18:30:48.000000000 +0100
+++ nbweb-1.9.2/cache.py	2008-04-06 13:35:48.000000000 +0100
@@ -3,7 +3,8 @@
 import datetime
 from glob import glob
 
-CACHE_PATH = os.path.join(os.path.dirname(__file__), "cache/")
+CACHE_PATH = os.path.join(os.environ['HOME'], ".nodebox-web-cache", "")
+        
 
 class Cache:
     
@@ -20,7 +21,7 @@
         self.type = type
         
         if not os.path.exists(self.path):
-            os.mkdir(self.path)
+            os.makedirs(self.path)
         
     def hash(self, id):