summary refs log tree commit diff
diff options
context:
space:
mode:
authorRicardo Garcia <sarbalap+freshmeat@gmail.com>2008-07-24 10:07:46 +0200
committerRicardo Garcia <sarbalap+freshmeat@gmail.com>2010-10-31 11:23:31 +0100
commit3af1e1728496f0cccd18946d03be78c5910914be (patch)
tree8a05137c10a77a9b2b79463344b8dcebbe125ef3
parentacd3d842987ee4c407093aaa4dedf4f301895adc (diff)
downloadyoutube-dl-3af1e1728496f0cccd18946d03be78c5910914be.tar.gz
youtube-dl-3af1e1728496f0cccd18946d03be78c5910914be.tar.xz
youtube-dl-3af1e1728496f0cccd18946d03be78c5910914be.zip
Fix directory creation not working with absolute paths
-rwxr-xr-xyoutube-dl1
1 files changed, 1 insertions, 0 deletions
diff --git a/youtube-dl b/youtube-dl
index 4dea34376..fe64819c7 100755
--- a/youtube-dl
+++ b/youtube-dl
@@ -94,6 +94,7 @@ class FileDownloader(object):
 		"""Create directory components in filename. Similar to Unix "mkdir -p"."""
 		components = filename.split(os.sep)
 		aggregate = [os.sep.join(components[0:x]) for x in xrange(1, len(components))]
+		aggregate = ['%s%s' % (x, os.sep) for x in aggregate] # Finish names with separator
 		for dir in aggregate:
 			if not os.path.exists(dir):
 				os.mkdir(dir)