mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-08-07 09:01:38 -04:00
News download: Fix very long URLs for links to pages causing errors on windows because of max path length restrictions. Fixes #1313982 [Fetch failed from New York Times](https://bugs.launchpad.net/calibre/+bug/1313982)
This commit is contained in:
parent
220daf93f6
commit
2193370d31
@ -542,7 +542,7 @@ class RecursiveFetcher(object):
|
||||
_fname.decode('latin1', 'replace')
|
||||
_fname = _fname.encode('ascii', 'replace').replace('%', '').replace(os.sep, '')
|
||||
_fname = ascii_filename(_fname)
|
||||
_fname = os.path.splitext(_fname)[0]+'.xhtml'
|
||||
_fname = os.path.splitext(_fname)[0][:120] + '.xhtml'
|
||||
res = os.path.join(linkdiskpath, _fname)
|
||||
self.downloaded_paths.append(res)
|
||||
self.filemap[nurl] = res
|
||||
|
Loading…
x
Reference in New Issue
Block a user