Skip to content

Commit

Permalink
Merge pull request #657 from yorik/fix-autostart
Browse files Browse the repository at this point in the history
Fix #162: Removes panic in Autostart package
  • Loading branch information
DarthGandalf authored Mar 27, 2024
2 parents 0966fc2 + ed84c78 commit 53367d1
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions share/shutter/resources/modules/Shutter/App/Autostart.pm
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,10 @@ sub create_autostart_file {

my $path = $dir . "/shutter.desktop";

open FILE, ">:utf8", $path or die $!;
open FILE, ">:utf8", $path or do {
warn "WARNING: can not create/update file $path: $!\n";
return FALSE;
};
foreach my $line (@data) {
if ($line =~ /Exec=shutter<options>/) {

Expand All @@ -74,7 +77,7 @@ sub create_autostart_file {
}
print FILE $line;
}
close FILE or die $!;
close FILE or warn "WARNING: close $path fail: $!\n";

return TRUE;
}
Expand Down

0 comments on commit 53367d1

Please sign in to comment.