From 285431e0abba5501d9061a5ac047210fd5633a64 Mon Sep 17 00:00:00 2001 From: Chris Cromer Date: Fri, 19 Jul 2019 08:42:19 -0400 Subject: [PATCH] fix tray --- src/pamac-tray/tray.vala | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/src/pamac-tray/tray.vala b/src/pamac-tray/tray.vala index e60aa38..84b346a 100644 --- a/src/pamac-tray/tray.vala +++ b/src/pamac-tray/tray.vala @@ -303,7 +303,10 @@ namespace Pamac { start_daemon (); try { - lockfile = GLib.File.new_for_path (daemon.get_lockfile ()); + string path = daemon.get_lockfile (); + if (path != null) { + lockfile = GLib.File.new_for_path (path); + } } catch (IOError e) { stderr.printf ("IOError: %s\n", e.message); try_standard_lock (); @@ -323,14 +326,8 @@ namespace Pamac { this.hold (); } - private try_standard_lock () { - try { - lockfile = GLib.File.new_for_path ("var/lib/pacman/db.lck"); - } catch (IOError e) { - stderr.printf ("IOError: %s\n", e.message); - } catch (DBusError e) { - stderr.printf ("DBusError: %s\n", e.message); - } + private void try_standard_lock () { + lockfile = GLib.File.new_for_path ("var/lib/pacman/db.lck"); } public override void activate () {