--- doc/loncapafiles/removenolongerused.piml 2013/09/22 18:31:55 1.1.2.6 +++ doc/loncapafiles/removenolongerused.piml 2014/06/20 19:25:41 1.1.2.7 @@ -11,6 +11,7 @@ my %paths = ( 'londaemons' => '/home/httpd/perl', 'apache' => '/home/httpd/lib/perl/Apache', 'londocroot' => '/home/httpd/html', + 'debug' => '/home/httpd/perl/debug', ); my %files = ( @@ -21,11 +22,12 @@ my %files = ( 'adm/rat/extpickframe.html', 'adm/help/gif/vbkm.gif', 'adm/help/eps/vbkm.eps'], + 'debug' => ['archive_coursedata_tables.pl'], ); my %dirs = ( - 'londocroot' => 'htmlarea', - 'res/adm/pages/bookmarkmenu', + 'londocroot' => ['htmlarea', + 'res/adm/pages/bookmarkmenu'], ); my @filestodelete = (); @@ -34,7 +36,7 @@ foreach my $key (sort(keys(%files))) { if ($paths{$key} ne '') { if (ref($files{$key}) eq 'ARRAY') { foreach my $file (@{$files{$key}}) { - if (-f $paths{$key}.'/'.$file) { + if (($file ne '') && (-f $paths{$key}.'/'.$file)) { push(@filestodelete,$paths{$key}.'/'.$file); } } @@ -46,7 +48,7 @@ foreach my $key (sort(keys(%dirs))) { if ($paths{$key} ne '') { if (ref($dirs{$key}) eq 'ARRAY') { foreach my $dir (@{$dirs{$key}}) { - if (-d $paths{$key}.'/'.$dir) { + if (($dir ne '') && (-d $paths{$key}.'/'.$dir)) { push(@dirstodelete,$paths{$key}.'/'.$dir); } }