fix localdata with correct paths
[spider.git] / perl / DXUtil.pm
index b58a4528d5649bc60df8dbcd23e892e58bde30b5..93030bfc88e785987c49b7f9e85d334ffc6ba43a 100644 (file)
@@ -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;
                }
        }