From ed9e7063e6a63c520b76ed4848e213d39a03657b Mon Sep 17 00:00:00 2001 From: Mamoru TASAKA Date: Oct 01 2020 01:31:01 +0000 Subject: Fix crash when some extensional scheme (supported by Thunar, PcmanFM, for example) is used (bug 1883688) --- diff --git a/0002-Fix-python-crash-when-some-extension-scheme-is-used.patch b/0002-Fix-python-crash-when-some-extension-scheme-is-used.patch new file mode 100644 index 0000000..a3df69f --- /dev/null +++ b/0002-Fix-python-crash-when-some-extension-scheme-is-used.patch @@ -0,0 +1,31 @@ +From 155895dec221a8a7d69bbae132404a1628e93dbb Mon Sep 17 00:00:00 2001 +From: Mamoru TASAKA +Date: Thu, 1 Oct 2020 10:24:58 +0900 +Subject: [PATCH] Fix python crash when some extension scheme is used. + +When some extension scheme is specified for the folder to search files, +gtk_file_chooser_get_filename() can return empty string. +Fix crash when such schema is used. +--- + catfish/CatfishSearchEngine.py | 5 +++++ + 1 file changed, 5 insertions(+) + +diff --git a/catfish/CatfishSearchEngine.py b/catfish/CatfishSearchEngine.py +index 9d7ff64..5033671 100644 +--- a/catfish/CatfishSearchEngine.py ++++ b/catfish/CatfishSearchEngine.py +@@ -169,6 +169,11 @@ class CatfishSearchEngine: + else: + keys.append(key) + ++ # path may be empty when some "extension" scheme is used in URL ++ if not path: ++ self.stop() ++ return ++ + # For simplicity, make sure the path contains a trailing '/' + if not path.endswith('/'): + path += '/' +-- +2.28.0 + diff --git a/catfish.spec b/catfish.spec index ccca1db..24e3f34 100644 --- a/catfish.spec +++ b/catfish.spec @@ -7,7 +7,7 @@ BuildRequires: %1 \ %define mainver 1.4.13 %undefine betaver -%define fedoraver 1 +%define fedoraver 2 Name: catfish Version: %{mainver} @@ -20,6 +20,9 @@ Source0: https://archive.xfce.org/src/apps/catfish/1.4/catfish-%{version}%{?beta # https://gitlab.xfce.org/apps/catfish/-/issues/33 # Currently under review Patch1: 0001-Support-python-3.9-and-drop-support-python-3.2.patch +# https://bugzilla.redhat.com/show_bug.cgi?id=1883688 +# https://gitlab.xfce.org/apps/catfish/-/issues/35 +Patch2: 0002-Fix-python-crash-when-some-extension-scheme-is-used.patch BuildArch: noarch BuildRequires: desktop-file-utils @@ -66,6 +69,7 @@ options. %setup -q -T -c -a 0 %{name}-%{mainver}%{?betaver} pushd %{name}-%{mainver}* %patch1 -p1 +%patch2 -p1 # Fix up permissions... find . -type f -print0 | xargs --null chmod 0644 @@ -168,7 +172,11 @@ appstream-util validate-relax --nonet %{buildroot}%{_metainfodir}/%{name}.appdat %changelog -* Thu Sep 30 2020 Mamoru TASAKA - 1.4.13-1 +* Thu Oct 1 2020 Mamoru TASAKA - 1.4.13-2 +- Fix crash when some extensional scheme (supported by Thunar, PcmanFM, + for example) is used (bug 1883688) + +* Wed Sep 30 2020 Mamoru TASAKA - 1.4.13-1 - 1.4.13 - Remove x11 backend wrapper, 1.4.12 says wayland is supported - Patch to support python 3.9