summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--tests/CuTmpdir.pm2
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/CuTmpdir.pm b/tests/CuTmpdir.pm
index a7dd8b6a8..166e50bd8 100644
--- a/tests/CuTmpdir.pm
+++ b/tests/CuTmpdir.pm
@@ -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};