From c6fe32df427188fddd7a3df3f417531d7bd1d310 Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Wed, 29 Feb 2012 09:57:46 -0500 Subject: only do replacement on windows --- pyramid/config/views.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pyramid/config/views.py b/pyramid/config/views.py index 1e213cced..1baaefcb6 100644 --- a/pyramid/config/views.py +++ b/pyramid/config/views.py @@ -1617,7 +1617,9 @@ class StaticURLInfo(object): registry = get_current_registry() for (url, spec, route_name) in self._get_registrations(registry): if path.startswith(spec): - subpath = path[len(spec):].replace('\\', '/') # windows + subpath = path[len(spec):] + if WIN: # pragma: no cover + subpath = subpath.replace('\\', '/') # windows if url is None: kw['subpath'] = subpath return request.route_url(route_name, **kw) -- cgit v1.2.3