mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
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:
parent
f77c06cba3
commit
c6b037301d
@ -14,6 +14,7 @@ from qt.core import (
|
|||||||
QTimer, QUrl, QVBoxLayout
|
QTimer, QUrl, QVBoxLayout
|
||||||
)
|
)
|
||||||
from threading import Thread
|
from threading import Thread
|
||||||
|
from contextlib import suppress
|
||||||
|
|
||||||
from calibre import as_unicode, browser, prints
|
from calibre import as_unicode, browser, prints
|
||||||
from calibre.constants import DEBUG, iswindows
|
from calibre.constants import DEBUG, iswindows
|
||||||
@ -169,8 +170,9 @@ def path_from_qurl(qurl, allow_remote=False):
|
|||||||
if lf:
|
if lf:
|
||||||
if iswindows:
|
if iswindows:
|
||||||
from calibre_extensions.winutil import get_long_path_name
|
from calibre_extensions.winutil import get_long_path_name
|
||||||
lf = get_long_path_name(lf)
|
with suppress(OSError):
|
||||||
lf = make_long_path_useable(lf)
|
lf = get_long_path_name(lf)
|
||||||
|
lf = make_long_path_useable(lf)
|
||||||
return lf
|
return lf
|
||||||
if not allow_remote:
|
if not allow_remote:
|
||||||
return ''
|
return ''
|
||||||
|
Loading…
x
Reference in New Issue
Block a user