7258 7618 7837: let the win() stuff to windows, fix url/uri handling with non-ascii characters under linux and mac (not tested under mac)
This commit is contained in:
parent
48763c8ade
commit
a615ba35a4
@ -520,7 +520,10 @@ class GalleryTab(ButtonTab, DbGUIElement):
|
||||
else:
|
||||
files = sel_data.get_uris()
|
||||
for file in files:
|
||||
if win():
|
||||
d = conv_to_unicode((file.replace('\0',' ').strip()), None)
|
||||
else:
|
||||
d = file
|
||||
protocol, site, mfile, j, k, l = urlparse(d)
|
||||
if protocol == "file":
|
||||
name = url2pathname(mfile)
|
||||
|
@ -184,9 +184,12 @@ class MediaView(ListView):
|
||||
#modern file managers provide URI_LIST. For Windows split sel_data.data
|
||||
files = sel_data.get_uris()
|
||||
for file in files:
|
||||
if win():
|
||||
clean_string = conv_to_unicode(
|
||||
file.replace('\0',' ').replace("\r", " ").strip(),
|
||||
None)
|
||||
else:
|
||||
clean_string = file
|
||||
protocol, site, mfile, j, k, l = urlparse(clean_string)
|
||||
if protocol == "file":
|
||||
name = url2pathname(mfile)
|
||||
|
Loading…
Reference in New Issue
Block a user