[LON-CAPA-cvs] cvs: doc /loncapafiles removenolongerused.piml
raeburn
raeburn at source.lon-capa.org
Fri Jun 20 15:23:03 EDT 2014
raeburn Fri Jun 20 19:23:03 2014 EDT
Modified files:
/doc/loncapafiles removenolongerused.piml
Log:
- Values in %dirs hash for each key are anonymous arrays.
- Sanity checking -- file or dir should not be empty string.
Index: doc/loncapafiles/removenolongerused.piml
diff -u doc/loncapafiles/removenolongerused.piml:1.9 doc/loncapafiles/removenolongerused.piml:1.10
--- doc/loncapafiles/removenolongerused.piml:1.9 Fri Jun 20 19:01:02 2014
+++ doc/loncapafiles/removenolongerused.piml Fri Jun 20 19:23:03 2014
@@ -32,9 +32,9 @@
);
my %dirs = (
- 'londocroot' => 'adm/lonLCDfont',
- 'htmlarea',
- 'res/adm/pages/bookmarkmenu',
+ 'londocroot' => ['adm/lonLCDfont',
+ 'htmlarea',
+ 'res/adm/pages/bookmarkmenu'],
);
my %multis = (
@@ -48,7 +48,7 @@
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);
}
}
@@ -60,7 +60,7 @@
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);
}
}
More information about the LON-CAPA-cvs
mailing list