Delete in reverse order

This commit is contained in:
Jamie Cameron
2007-05-24 18:41:27 +00:00
parent f2bc0d2f64
commit f0315caed3

View File

@@ -12,7 +12,7 @@ require './logrotate-lib.pl';
# Delete the sections
$parent = &get_config_parent();
$conf = $parent->{'members'};
foreach $d (@d) {
foreach $d (sort { $b <=> $a } @d) {
$log = $conf->[$d];
&lock_file($log->{'file'});
&save_directive($parent, $log, undef);