forked from cromer/pamac-classic
fix path assertion error
This commit is contained in:
parent
3b66f68b2c
commit
cd1f361c51
@ -306,12 +306,10 @@ namespace Pamac {
|
|||||||
lockfile = GLib.File.new_for_path (daemon.get_lockfile ());
|
lockfile = GLib.File.new_for_path (daemon.get_lockfile ());
|
||||||
} catch (IOError e) {
|
} catch (IOError e) {
|
||||||
stderr.printf ("IOError: %s\n", e.message);
|
stderr.printf ("IOError: %s\n", e.message);
|
||||||
//try standard lock file
|
try_standard_lock ();
|
||||||
lockfile = GLib.File.new_for_path ("var/lib/pacman/db.lck");
|
|
||||||
} catch (DBusError e) {
|
} catch (DBusError e) {
|
||||||
stderr.printf ("DBusError: %s\n", e.message);
|
stderr.printf ("DBusError: %s\n", e.message);
|
||||||
//try standard lock file
|
try_standard_lock ();
|
||||||
lockfile = GLib.File.new_for_path ("var/lib/pacman/db.lck");
|
|
||||||
}
|
}
|
||||||
Timeout.add (200, check_extern_lock);
|
Timeout.add (200, check_extern_lock);
|
||||||
// wait 30 seconds before check updates
|
// wait 30 seconds before check updates
|
||||||
@ -325,6 +323,16 @@ namespace Pamac {
|
|||||||
this.hold ();
|
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);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public override void activate () {
|
public override void activate () {
|
||||||
// nothing to do
|
// nothing to do
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user