fix export_users cmd
[spider.git] / perl / DXUtil.pm
index 28e7396dcebd3143d25d29b49c989e98c4c7592d..4477a94bef90a3ef8e5abdc5ad5814fc53eb3bbb 100644 (file)
@@ -472,16 +472,14 @@ sub deleteitem
 sub localdata
 {
        my $ifn = shift;
-       my $ofn = "$main::data/$ifn";
+       my $ofn = "$main::local_data/$ifn";
        my $tfn;
        
        if (-e "$main::local_data") {
-               $tfn = "$main::local_data/$ifn";
+               $tfn = "$main::data/$ifn";
                if (-e $tfn && -e $ofn) {
-                       $ofn = $tfn if -M $tfn < -M $ofn;
-               } elsif (-e $tfn) {
-                       $ofn = $tfn;
-               }
+                       $ofn = $tfn if -M $ofn < -M $tfn;
+               } 
        }
 
        return $ofn;