From a0d7ca949b1ca21cac52084296002ec4c2fffbda Mon Sep 17 00:00:00 2001 From: Xavier Morel Date: Fri, 20 Jul 2012 16:29:34 +0200 Subject: [PATCH] [FIX] Ensure static file URLs are actually URLs, not windows file paths bzr revid: xmo@openerp.com-20120720142934-dve9omni4av3d500 --- addons/web/controllers/main.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/addons/web/controllers/main.py b/addons/web/controllers/main.py index b89bac53854..d44ddc62153 100644 --- a/addons/web/controllers/main.py +++ b/addons/web/controllers/main.py @@ -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):