Merge pull request #970 from nwjsmith/develop

Work around Python 2.6 bug involving relative paths from root
This commit is contained in:
Thomas S Hatch 2012-03-20 08:29:52 -07:00
commit 5b159230ac

View File

@ -249,14 +249,13 @@ class Client(object):
else:
return ''
else:
dest = os.path.join(
self.opts['cachedir'],
'extrn_files',
env,
os.path.join(
dest = os.path.normpath(
os.sep.join([
self.opts['cachedir'],
'extrn_files',
env,
url_data.netloc,
os.path.relpath(os.path.relpath(url_data.path, '/'), '..')
))
url_data.path]))
destdir = os.path.dirname(dest)
if not os.path.isdir(destdir):
os.makedirs(destdir)