Windows: Fix drag and drop from winzip not working. Fixes #1942129 [Trying to drag and drop a file from winrar](https://bugs.launchpad.net/calibre/+bug/1942129)

This commit is contained in:
Kovid Goyal 2021-08-31 09:06:41 +05:30
parent f77c06cba3
commit c6b037301d
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -14,6 +14,7 @@ from qt.core import (
QTimer, QUrl, QVBoxLayout
)
from threading import Thread
from contextlib import suppress
from calibre import as_unicode, browser, prints
from calibre.constants import DEBUG, iswindows
@ -169,8 +170,9 @@ def path_from_qurl(qurl, allow_remote=False):
if lf:
if iswindows:
from calibre_extensions.winutil import get_long_path_name
lf = get_long_path_name(lf)
lf = make_long_path_useable(lf)
with suppress(OSError):
lf = get_long_path_name(lf)
lf = make_long_path_useable(lf)
return lf
if not allow_remote:
return ''