Get drag and drop data correctly

Fixes #8773
This commit is contained in:
Philipp Hörist 2017-10-31 18:13:31 +01:00
parent 1b9c5066f5
commit ecd5c652a2
1 changed files with 3 additions and 2 deletions

View File

@ -1268,8 +1268,9 @@ class ChatControl(ChatControlBase):
if target_type == self.TARGET_TYPE_URI_LIST:
if not c.resource: # If no resource is known, we can't send a file
return
uri = selection.get_data().strip()
uri_splitted = uri.split() # we may have more than one file dropped
# we may have more than one file dropped
uri_splitted = selection.get_uris()
for uri in uri_splitted:
path = helpers.get_file_path_from_dnd_dropped_uri(uri)
if os.path.isfile(path): # is it file?