Fix for windows path issues in web2lrf.

This commit is contained in:
Kovid Goyal 2007-11-09 22:30:41 +00:00
parent 19b02787b2
commit 3daaed9e39

View File

@ -140,7 +140,12 @@ def process_profile(args, options, logger=None):
options.anchor_ids = False
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:
if tdir and os.path.isdir(tdir):
shutil.rmtree(tdir)