From 3379b0cf851e30194db8f0af062a1c74d994d93c Mon Sep 17 00:00:00 2001 From: "kjellander@webrtc.org" Date: Wed, 23 Nov 2011 15:24:44 +0000 Subject: [PATCH] Fixing resources script on Windows Invalid concatenation of the URL to the download file made it fail downloading on Windows. Review URL: http://webrtc-codereview.appspot.com/290003 git-svn-id: http://webrtc.googlecode.com/svn/trunk@1005 4adac7df-926f-26a2-2b94-8c16560cd09d --- tools/resources/update.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tools/resources/update.py b/tools/resources/update.py index 18d3e5743b..28c9be21be 100755 --- a/tools/resources/update.py +++ b/tools/resources/update.py @@ -12,6 +12,7 @@ __author__ = 'kjellander@webrtc.org (Henrik Kjellander)' """Downloads WebRTC resources files from a remote host.""" from optparse import OptionParser +from urlparse import urljoin import os import shutil import sys @@ -31,7 +32,7 @@ def main(): """ # Constants deps_key = 'webrtc_resources_revision' - remote_url_base = 'http://commondatastorage.googleapis.com/webrtc-resources' + remote_url_base = 'http://commondatastorage.googleapis.com/webrtc-resources/' version_filename = 'webrtc-resources-version' filename_prefix = 'webrtc-resources-' extension = '.tgz' @@ -69,7 +70,7 @@ def main(): if latest_version > current_version or options.force: temp_dir = tempfile.mkdtemp(prefix='webrtc-resources-') archive_name = '%s%s%s' % (filename_prefix, latest_version, extension) - remote_archive_url = os.path.join(remote_url_base, archive_name) + remote_archive_url = urljoin(remote_url_base, archive_name) # Download into the temporary directory with display of progress, inspired # by the Stack Overflow post at http://goo.gl/JIrbo temp_file = os.path.join(temp_dir, archive_name)