diff options
author | Richard Levitte <levitte@openssl.org> | 2016-06-22 13:39:46 +0200 |
---|---|---|
committer | Richard Levitte <levitte@openssl.org> | 2016-06-22 22:24:07 +0200 |
commit | 768a3eca39a78b46cfba66b731956a2d2edf4683 (patch) | |
tree | b5819f2f6fc082c9db738046239c21dcce315045 /test/testlib | |
parent | fc6076ca272f74eb1364c29e6974ad5da5ef9777 (diff) |
OpenSSL::Test: Fix directory calculations in __cwd()
The previous fix contained a mistake, where any absolute path in
%directories would be cleared away instead of just being left alone.
Reviewed-by: Rich Salz <rsalz@openssl.org>
Diffstat (limited to 'test/testlib')
-rw-r--r-- | test/testlib/OpenSSL/Test.pm | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/test/testlib/OpenSSL/Test.pm b/test/testlib/OpenSSL/Test.pm index 6a10afd653..31f41057f0 100644 --- a/test/testlib/OpenSSL/Test.pm +++ b/test/testlib/OpenSSL/Test.pm @@ -854,7 +854,12 @@ sub __cwd { rmtree(".", { safe => 0, keep_root => 1 }); } - %directories = %tmp_directories; + # We put back new values carefully. Doing the obvious + # %directories = ( %tmp_irectories ) + # will clear out any value that happens to be an absolute path + foreach (keys %tmp_directories) { + $directories{$_} = $tmp_directories{$_}; + } foreach (keys %tmp_ENV) { $ENV{$_} = $tmp_ENV{$_}; } |