--- a/web/webconfig.py Wed Apr 04 18:44:07 2012 +0200
+++ b/web/webconfig.py Thu Apr 05 14:44:00 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
@@ -405,7 +405,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):