Don't be overzealous in cleaning up the cache root directory. Fixes bug #11814

This commit is contained in:
Colin Kuskie 2010-09-07 11:14:52 -07:00
parent 34c48e6e41
commit 91acd4c632
2 changed files with 3 additions and 2 deletions

View file

@ -9,6 +9,7 @@
- fixed #11832: Admin Session Interface broken
- fixed: Attachment label in the Template is missing
- fixed #11810: Attachment list broken in template
- fixed #11814: upgrade script removes cache too aggresively (Ernesto Hernández-Novich)
7.9.13
- fixed #11783: Instances deleted during realtime run

View file

@ -144,10 +144,10 @@ foreach my $filename (keys %{$configs}) {
unless ($skipDelete) {
print "\tDeleting temp files.\n" unless ($quiet);
my $path = $configs->{$filename}->get("uploadsPath").$slash."temp";
File::Path::rmtree($path) unless ($path eq "" || $path eq "/" || $path eq "/data");
File::Path::rmtree($path, {keep_root => 1, }) unless ($path eq "" || $path eq "/" || $path eq "/data");
print "\tDeleting file cache.\n" unless ($quiet);
$path = $configs->{$filename}->get("fileCacheRoot")||"/tmp/WebGUICache";
File::Path::rmtree($path) unless ($path eq "" || $path eq "/" || $path eq "/data");
File::Path::rmtree($path, {keep_root => 1, }) unless ($path eq "" || $path eq "/" || $path eq "/data");
}
}
$session->close();