Fixed DnD breakage

This commit is contained in:
itdominator 2021-12-27 17:27:57 -06:00
parent a022fa29ea
commit b7b20164e8
2 changed files with 6 additions and 2 deletions

View File

@ -236,8 +236,10 @@ class WidgetFileActionMixin:
for path in paths:
try:
file = Gio.File.new_for_path(path)
if "file://" in path:
path = path.split("file://")[1]
file = Gio.File.new_for_path(path)
if _target_path:
if os.path.isdir(_target_path):
info = file.query_info("standard::display-name", 0, cancellable=None)

View File

@ -196,7 +196,9 @@ class WindowMixin(TabMixin):
wid, tid = action.split("|")
store = iconview.get_model()
treePaths = iconview.get_selected_items()
uris = self.format_to_uris(store, wid, tid, treePaths, True)
# NOTE: Need URIs as URI format for DnD to work. Will strip 'file://'
# further down call chain when doing internal fm stuff.
uris = self.format_to_uris(store, wid, tid, treePaths)
uris_text = '\n'.join(uris)
data.set_uris(uris)