Skip to content

Commit 14933c6

Browse files
committed
_flatpak.py: Don't try to pass a NULL branch to construct a
FlatpakRemoteRef. In libflatpak, even though FlatpakRef branch property defaults to NULL, any attempt to set it assumes the value passed is non-NULL, resulting in a segfault when performing a string search. Assume 'master' if a broken .flatpakref file doesn't provide a Branch field. This is a guess, but the only reasonable value to pass. Fixes linuxmint/mintinstall#448.
1 parent ea5bef8 commit 14933c6

File tree

1 file changed

+1
-1
lines changed
  • usr/lib/python3/dist-packages/mintcommon/installer

1 file changed

+1
-1
lines changed

usr/lib/python3/dist-packages/mintcommon/installer/_flatpak.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1026,7 +1026,7 @@ def _pkginfo_from_file_thread(cache, file, callback):
10261026
except GLib.Error as e:
10271027
if e.code == GLib.KeyFileError.KEY_NOT_FOUND:
10281028
warn("Installer: flatpak - flatpakref file doesn't have a Branch key, maybe nightly or testing.")
1029-
branch = None
1029+
branch = "master"
10301030

10311031
remote_name = _get_remote_name_by_url(fp_sys, url)
10321032

0 commit comments

Comments
 (0)