mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-08 18:54:09 -04:00
Save to disk: Fix a regression that prevented saving of files into the root of a drive on windows
This commit is contained in:
parent
b5849698c0
commit
ea222f75be
@ -212,6 +212,9 @@ class Saver(QObject):
|
|||||||
if not fmts and not self.opts.write_opf and not self.opts.save_cover:
|
if not fmts and not self.opts.write_opf and not self.opts.save_cover:
|
||||||
return
|
return
|
||||||
|
|
||||||
|
# On windows python incorrectly raises an access denied exception
|
||||||
|
# when trying to create the root of a drive, like C:\
|
||||||
|
if os.path.dirname(base_dir) != base_dir:
|
||||||
try:
|
try:
|
||||||
os.makedirs(base_dir)
|
os.makedirs(base_dir)
|
||||||
except EnvironmentError as err:
|
except EnvironmentError as err:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user