--- a/web/webconfig.py Thu Mar 29 14:20:41 2012 +0200
+++ b/web/webconfig.py Tue Apr 10 17:03:19 2012 +0200
@@ -21,7 +21,7 @@
_ = unicode
import os
-from os.path import join, exists, split
+from os.path import join, exists, split, isdir
from warnings import warn
from logilab.common.decorators import cached
@@ -408,7 +408,8 @@
rdir, filename = split(rpath)
if rdir:
staticdir = join(staticdir, rdir)
- os.makedirs(staticdir)
+ if not isdir(staticdir) and 'w' in mode:
+ os.makedirs(staticdir)
return file(join(staticdir, filename), mode)
def static_file_add(self, rpath, data):