Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/techsneeze/dmarcts-report-parser.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorpressy <bart@terta.de>2017-07-24 22:51:00 +0300
committerpressy <bart@terta.de>2017-07-24 22:51:00 +0300
commit02a7b12ef72e63e8ec3c170153a8ad66d25d74f5 (patch)
treed07423af35cdee6317c6e3b3bfa56f8f6c3e6f46
parent7f478d0f887094ff7698fbf54fd8805c0cbcf626 (diff)
added change for already absolute path or starting with .
-rwxr-xr-xdmarcts-report-parser.pl7
1 files changed, 5 insertions, 2 deletions
diff --git a/dmarcts-report-parser.pl b/dmarcts-report-parser.pl
index 94577e9..1ab7cef 100755
--- a/dmarcts-report-parser.pl
+++ b/dmarcts-report-parser.pl
@@ -127,7 +127,7 @@ my $conf_file = 'dmarcts-report-parser.conf';
# locate conf file or die
if ( -e $conf_file ) {
-# $conf_file = "./$conf_file";
+ #$conf_file = "./$conf_file";
} elsif( -e (File::Basename::dirname($0) . "/$conf_file" ) ) {
$conf_file = ( File::Basename::dirname($0) . "/$conf_file" );
} else {
@@ -136,7 +136,10 @@ if ( -e $conf_file ) {
}
# load conf file with error handling
-my $conf_return = do "./$conf_file";
+if ( substr($conf_file, 0, 1) ne '/' and substr($conf_file, 0, 1) ne '.') {
+ $conf_file = "./$conf_file";
+}
+my $conf_return = do $conf_file;
die "couldn't parse $conf_file: $@" if $@;
die "couldn't do $conf_file: $!" unless defined $conf_return;