aboutsummaryrefslogtreecommitdiff
path: root/i3-dmenu-desktop
diff options
context:
space:
mode:
authorCedric <cedric@lenovo.home>2016-03-20 12:12:11 +0100
committerCedric Buissart <cedric.buissart@gmail.com>2016-03-23 18:48:38 +0100
commit7b1729a85bd511d591e620fcc32985a76180358f (patch)
tree4950b8482d6202e4e372f276a31341d6aef4144a /i3-dmenu-desktop
parent868180565e2e6e847e4967d73c794fb04299c1f8 (diff)
downloadi3-7b1729a85bd511d591e620fcc32985a76180358f.tar.gz
i3-7b1729a85bd511d591e620fcc32985a76180358f.zip
i3-dmenu-desktop: do not die on failed open
Diffstat (limited to 'i3-dmenu-desktop')
-rwxr-xr-xi3-dmenu-desktop6
1 files changed, 5 insertions, 1 deletions
diff --git a/i3-dmenu-desktop b/i3-dmenu-desktop
index a0549ead..3b81cb20 100755
--- a/i3-dmenu-desktop
+++ b/i3-dmenu-desktop
@@ -25,7 +25,11 @@ binmode STDERR, ':utf8';
# reads in a whole file
sub slurp {
my ($filename) = @_;
- open(my $fh, '<', $filename) or die "$!";
+ my $fh;
+ if (!open($fh, '<', $filename)) {
+ warn "Could not open $filename: $!";
+ return undef;
+ }
local $/;
my $result;
eval {