mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Fix for windows path issues in web2lrf.
This commit is contained in:
parent
19b02787b2
commit
3daaed9e39
@ -140,7 +140,12 @@ def process_profile(args, options, logger=None):
|
|||||||
options.anchor_ids = False
|
options.anchor_ids = False
|
||||||
|
|
||||||
htmlfile, tdir = fetch_website(options, logger)
|
htmlfile, tdir = fetch_website(options, logger)
|
||||||
create_lrf(htmlfile, options, logger)
|
cwd = os.getcwdu()
|
||||||
|
try:
|
||||||
|
os.chdir(os.path.dirname(htmlfile))
|
||||||
|
create_lrf(os.path.basename(htmlfile), options, logger)
|
||||||
|
finally:
|
||||||
|
os.chdir(cwd)
|
||||||
finally:
|
finally:
|
||||||
if tdir and os.path.isdir(tdir):
|
if tdir and os.path.isdir(tdir):
|
||||||
shutil.rmtree(tdir)
|
shutil.rmtree(tdir)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user