dnd now works in windows too
This commit is contained in:
parent
19845744c8
commit
7c2e69cf8b
|
@ -267,7 +267,9 @@ def get_file_path_from_dnd_dropped_uri(uri):
|
||||||
path = urllib.url2pathname(uri) # escape special chars
|
path = urllib.url2pathname(uri) # escape special chars
|
||||||
path = path.strip('\r\n\x00') # remove \r\n and NULL
|
path = path.strip('\r\n\x00') # remove \r\n and NULL
|
||||||
# get the path to file
|
# get the path to file
|
||||||
if path.startswith('file://'): # nautilus, rox
|
if path.startswith('file:\\\\\\'): # windows
|
||||||
|
path = path[8:] # 8 is len('file:///')
|
||||||
|
elif path.startswith('file://'): # nautilus, rox
|
||||||
path = path[7:] # 7 is len('file://')
|
path = path[7:] # 7 is len('file://')
|
||||||
elif path.startswith('file:'): # xffm
|
elif path.startswith('file:'): # xffm
|
||||||
path = path[5:] # 5 is len('file:')
|
path = path[5:] # 5 is len('file:')
|
||||||
|
|
Loading…
Reference in New Issue