mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Add a link to the upstream bug report in the workaround code
This commit is contained in:
parent
ae6ef2807d
commit
b9cdc80806
@ -1693,6 +1693,7 @@ def local_path_for_resource(qurl: QUrl, base_qurl: 'QUrl | None' = None) -> str:
|
||||
def fix_qt_bodging_windows_paths(path: str) -> str:
|
||||
# When loading <img src="file:///c:/path/to/img.png"> Qt gives us the
|
||||
# URL: //c/path/to/img.png Le bubbling sigh
|
||||
# https://bugreports.qt.io/browse/QTBUG-122201
|
||||
if iswindows and re.match(r'//[a-zA-Z]/', path) is not None and not os.path.exists(path):
|
||||
path = os.path.normpath(path[2] + ':' + path[3:])
|
||||
return path
|
||||
|
Loading…
x
Reference in New Issue
Block a user