From 6a8797506b8f8f3d92669cc0063b2d9818a3b9a0 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Fr=C3=A9d=C3=A9ric=20P=C3=A9ters?= Date: Thu, 21 May 2009 19:37:54 +0200 Subject: [PATCH] don't treat c:... as URL on Windows --- jhbuild/utils/httpcache.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/jhbuild/utils/httpcache.py b/jhbuild/utils/httpcache.py index 0e72f3e5..17a6fb76 100644 --- a/jhbuild/utils/httpcache.py +++ b/jhbuild/utils/httpcache.py @@ -29,6 +29,7 @@ and draws ideas from feedparser.py. Strategies include: ''' import os +import sys import urllib2 import urlparse import time @@ -166,6 +167,9 @@ class Cache: parts = urlparse.urlparse(uri) if parts[0] in ('', 'file'): return parts[2] + if sys.platform.startswith('win') and uri[1] == ':': + # On Windows, path like c:... are local + return uri now = time.time() -- 2.11.4.GIT