[FIX] Ensure static file URLs are actually URLs, not windows file paths

bzr revid: xmo@openerp.com-20120720142934-dve9omni4av3d500
This commit is contained in:
Xavier Morel
2012-07-20 16:29:34 +02:00
parent 9c38574bcc
commit a0d7ca949b
+4 -1
View File
@@ -142,7 +142,10 @@ class WebClient(openerpweb.Controller):
if mods is not None:
path += '?mods=' + mods
return [path]
return ['%s?debug=%s' % (wp, os.path.getmtime(fp)) for fp, wp in self.manifest_glob(req, mods, extension)]
# re-normalize fs paths to URLs: split on fs path separator
# ('/' or '\\' usually) and join on url path separator ('/')
return ['%s?debug=%s' % ('/'.join(wp.split(os.path.sep)), os.path.getmtime(fp))
for fp, wp in self.manifest_glob(req, mods, extension)]
@openerpweb.jsonrequest
def csslist(self, req, mods=None):