]> ruderich.org/simon Gitweb - fcscs/fcscs.git/blobdiff - bin/fcscs
use $screen->die instead of die when loading user config
[fcscs/fcscs.git] / bin / fcscs
index bdebda526ea820918988331525cb4b6a9aca9e78..971cb8098e3d46bc47a455fcfdcb4cdbe1a2d314 100755 (executable)
--- a/bin/fcscs
+++ b/bin/fcscs
@@ -1410,8 +1410,6 @@ package Fcscs {
     sub handler_paste { return main::handler_paste(@_); }
     sub handler_url { return main::handler_url(@_); }
 
-    sub debug { return main::debug(@_); }
-
     sub get_regex_matches { return main::get_regex_matches(@_); }
     sub select_match { return main::select_match(@_); }
 
@@ -1451,10 +1449,10 @@ package Fcscs {
         }
         # Make sure the file is not writable by other users. Doesn't handle
         # ACLs and see comment above about race conditions.
-        my @stat = stat $path or die $!;
+        my @stat = stat $path or $screen->die("Config '$decoded': $!");
         my $mode = $stat[2];
         if (($mode & Fcntl::S_IWGRP) or ($mode & Fcntl::S_IWOTH)) {
-            die "Config '$decoded' must not be writable by other users.";
+            $screen->die("Config '$decoded' must not be writable by other users.");
         }
 
         my $result = do $path;