diff --git a/gramps/gui/editors/displaytabs/gallerytab.py b/gramps/gui/editors/displaytabs/gallerytab.py index bd8a14c25..3a8bdcc24 100644 --- a/gramps/gui/editors/displaytabs/gallerytab.py +++ b/gramps/gui/editors/displaytabs/gallerytab.py @@ -520,7 +520,10 @@ class GalleryTab(ButtonTab, DbGUIElement): else: files = sel_data.get_uris() for file in files: - d = conv_to_unicode((file.replace('\0',' ').strip()), None) + 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) diff --git a/gramps/plugins/view/mediaview.py b/gramps/plugins/view/mediaview.py index 29ddf4458..67e9c48ff 100644 --- a/gramps/plugins/view/mediaview.py +++ b/gramps/plugins/view/mediaview.py @@ -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: - clean_string = conv_to_unicode( - file.replace('\0',' ').replace("\r", " ").strip(), - None) + 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)