From c5bb4a908942ad2c9a035b46b448d94d33420981 Mon Sep 17 00:00:00 2001 From: Paul Buetow Date: Thu, 15 Mar 2012 09:12:46 +0100 Subject: dont quit loadbars if loadbarsrc can not be overwritten --- CHANGELOG | 1 + loadbars | 7 ++++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/CHANGELOG b/CHANGELOG index 94bad5c..13be57f 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,6 +1,7 @@ * Dropped FreeBSD support / focus is Linux * On shutdown all sub-processes are gonna be terminated instantly (was old bug). Needs Proc::ProcessTable module. +* Dont quit loadbars if ~/.loadbarsrc can not be overwritten Sat Feb 25 20:09:02 CET 2012 * Release v0.5.1 diff --git a/loadbars b/loadbars index d4e56b7..a647abf 100755 --- a/loadbars +++ b/loadbars @@ -179,7 +179,12 @@ sub read_config () { sub write_config () { display_warn "Overwriting config file " . CONFFILE if -f CONFFILE; - open my $conffile, '>', CONFFILE or die "$!: " . CONFFILE . "\n"; + + open my $conffile, '>', CONFFILE or do { + display_warn "$!: " . CONFFILE; + + return undef; + }; for (keys %C) { print $conffile "$_=$C{$_}\n"; -- cgit v1.2.3