mirror of
https://gitlab.com/dstftw/youtube-dl.git
synced 2020-11-16 09:42:26 +00:00
Fix os.makedirs in Windows
This commit is contained in:
parent
eb99a7ee5f
commit
e5e74ffb97
|
@ -711,7 +711,9 @@ class FileDownloader(object):
|
||||||
return
|
return
|
||||||
|
|
||||||
try:
|
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:
|
except (OSError, IOError), err:
|
||||||
self.trouble(u'ERROR: unable to create directories: %s' % str(err))
|
self.trouble(u'ERROR: unable to create directories: %s' % str(err))
|
||||||
return
|
return
|
||||||
|
|
Loading…
Reference in a new issue