tests: again, do not change the mode of all directories below $HOME
authorRalf Wildenhues <Ralf.Wildenhues@gmx.de>
Tue, 22 Jul 2008 05:38:31 +0000 (07:38 +0200)
committerJim Meyering <meyering@redhat.com>
Tue, 22 Jul 2008 11:15:02 +0000 (13:15 +0200)
* tests/CuTmpdir.pm (chmod_tree): Do not run chmod on undefined
argument, can happen when the build path contains spaces.

tests/CuTmpdir.pm

index a7dd8b6..166e50b 100644 (file)
@@ -45,7 +45,7 @@ sub chmod_1
 
 sub chmod_tree
 {
-  if (chdir $dir)
+  if (defined $dir && chdir $dir)
     {
       # Perform the equivalent of find . -type d -print0|xargs -0 chmod -R 700.
       my $options = {untaint => 1, wanted => \&chmod_1};