X-Git-Url: http://dxcluster.net/gitweb/gitweb.cgi?a=blobdiff_plain;f=perl%2FDXUtil.pm;h=551a61921213ec00b90ab8a29738929bb0d647ce;hb=7de4da6653c38eb165afbea74a4a9b64f3541214;hp=28e7396dcebd3143d25d29b49c989e98c4c7592d;hpb=f6abc902d49e13eeca3ff50f84a74f28a3aa3390;p=spider.git diff --git a/perl/DXUtil.pm b/perl/DXUtil.pm index 28e7396d..551a6192 100644 --- a/perl/DXUtil.pm +++ b/perl/DXUtil.pm @@ -182,7 +182,7 @@ sub ptimelist my $ref = shift; my $out; for (sort keys %$ref) { - $out .= "$_=$ref->{$_}, "; + $out .= "$_=" . atime($ref->{$_}) . ", "; } chop $out; chop $out; @@ -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; } }