From: Dirk Koopman Date: Wed, 17 Aug 2016 00:08:10 +0000 (+0100) Subject: fix localdata with correct paths X-Git-Url: http://dxcluster.net/gitweb/gitweb.cgi?a=commitdiff_plain;h=d1daa87473f824fcae5751e2576c31265bf53544;p=spider.git fix localdata with correct paths --- diff --git a/perl/DXUtil.pm b/perl/DXUtil.pm index b58a4528..93030bfc 100644 --- a/perl/DXUtil.pm +++ b/perl/DXUtil.pm @@ -484,8 +484,10 @@ sub localdata my $tfn; if (-e "$main::local_data") { - $tfn = "main::local_data/$ifn"; - if (-e $tfn && -M $tfn < -M $ofn) { + $tfn = "$main::local_data/$ifn"; + if (-e $tfn && -e $ofn) { + $ofn = $tfn if -M $tfn < -M $ofn; + } elsif (-e $tfn) { $ofn = $tfn; } } diff --git a/perl/create_sysop.pl b/perl/create_sysop.pl index b85c60b7..6e7db09d 100755 --- a/perl/create_sysop.pl +++ b/perl/create_sysop.pl @@ -19,6 +19,7 @@ BEGIN { unshift @INC, "$root/local"; } +use DXVars; use SysVar; use DXUser; use DXUtil; diff --git a/perl/update_sysop.pl b/perl/update_sysop.pl index e7225c7c..613e91f0 100755 --- a/perl/update_sysop.pl +++ b/perl/update_sysop.pl @@ -22,6 +22,7 @@ BEGIN { unshift @INC, "$root/local"; } +use DXVars; use SysVar; use DXUser; use DXUtil;