git://git.jankratochvil.net
/
youtube-dl.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix os.makedirs in Windows
[youtube-dl.git]
/
youtube-dl
diff --git
a/youtube-dl
b/youtube-dl
index
cc6462c
..
153d413
100755
(executable)
--- a/
youtube-dl
+++ b/
youtube-dl
@@
-711,7
+711,9
@@
class FileDownloader(object):
return
try:
return
try:
- os.makedirs(os.path.dirname(filename))
+ dn = os.path.dirname(filename)
+ if dn != '' and not os.path.exists(dn):
+ os.makedirs(dn)
except (OSError, IOError), err:
self.trouble(u'ERROR: unable to create directories: %s' % str(err))
return
except (OSError, IOError), err:
self.trouble(u'ERROR: unable to create directories: %s' % str(err))
return