diff options
author | Cedric <cedric@lenovo.home> | 2016-03-20 12:12:11 +0100 |
---|---|---|
committer | Cedric Buissart <cedric.buissart@gmail.com> | 2016-03-23 18:48:38 +0100 |
commit | 7b1729a85bd511d591e620fcc32985a76180358f (patch) | |
tree | 4950b8482d6202e4e372f276a31341d6aef4144a /i3-dmenu-desktop | |
parent | 868180565e2e6e847e4967d73c794fb04299c1f8 (diff) | |
download | i3-7b1729a85bd511d591e620fcc32985a76180358f.tar.gz i3-7b1729a85bd511d591e620fcc32985a76180358f.zip |
i3-dmenu-desktop: do not die on failed open
Diffstat (limited to 'i3-dmenu-desktop')
-rwxr-xr-x | i3-dmenu-desktop | 6 |
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 { |