X-Git-Url: http://dxcluster.net/gitweb/gitweb.cgi?a=blobdiff_plain;f=perl%2FDXUtil.pm;h=8bb9b956c59d306b8aab36b6cab0807bca10c5bd;hb=172430f1a1a4b0ff593f5750e1e93c6c62a3ec76;hp=28e7396dcebd3143d25d29b49c989e98c4c7592d;hpb=f6abc902d49e13eeca3ff50f84a74f28a3aa3390;p=spider.git diff --git a/perl/DXUtil.pm b/perl/DXUtil.pm index 28e7396d..8bb9b956 100644 --- a/perl/DXUtil.pm +++ b/perl/DXUtil.pm @@ -472,15 +472,15 @@ 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"; - if (-e $tfn && -e $ofn) { - $ofn = $tfn if -M $tfn < -M $ofn; - } elsif (-e $tfn) { - $ofn = $tfn; + $tfn = "$main::data/$ifn"; + if ((-e $tfn) && (-e $ofn)) { + $ofn = $tfn if -M $ofn < -M $tfn; + } else { + $ofn = $tfn if -e $tfn; } }