Sort .data files by filename if modification times are the same.

This commit is contained in:
Ramon Novoa 2015-08-11 12:19:09 +02:00
parent 66fab9c4c2
commit a87a1f8750
1 changed files with 2 additions and 2 deletions

View File

@ -124,9 +124,9 @@ sub data_producer ($) {
# Temporarily disable warnings (some files may have been deleted)
no warnings;
if ($pa_config->{'dataserver_lifo'} == 0) {
@sorted = sort { -M $pa_config->{'incomingdir'} . "/$b" <=> -M $pa_config->{'incomingdir'} . "/$a" } (@files);
@sorted = sort { -M $pa_config->{'incomingdir'} . "/$b" <=> -M $pa_config->{'incomingdir'} . "/$a" || $a cmp $b } (@files);
} else {
@sorted = sort { -M $pa_config->{'incomingdir'} . "/$a" <=> -M $pa_config->{'incomingdir'} . "/$b" } (@files);
@sorted = sort { -M $pa_config->{'incomingdir'} . "/$a" <=> -M $pa_config->{'incomingdir'} . "/$b" || $b cmp $a } (@files);
}
}