소스 검색

Fix directory creation not working with absolute paths

Ricardo Garcia 17 년 전
부모
커밋
3af1e17284
1개의 변경된 파일1개의 추가작업 그리고 0개의 파일을 삭제
  1. 1 0
      youtube-dl

+ 1 - 0
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)