aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBjörn Gustavsson <[email protected]>2016-03-14 15:39:31 +0100
committerBjörn Gustavsson <[email protected]>2016-03-23 13:28:09 +0100
commit7ce333f6884ce6f3841d19f9b15a3b09fc3b4dab (patch)
tree11976f6ce955a9ba790e2eaea70436d0032d3857
parentad653a88f4766712f4a5a4aba7a7244186a42ba6 (diff)
downloadotp-7ce333f6884ce6f3841d19f9b15a3b09fc3b4dab.tar.gz
otp-7ce333f6884ce6f3841d19f9b15a3b09fc3b4dab.tar.bz2
otp-7ce333f6884ce6f3841d19f9b15a3b09fc3b4dab.zip
file_name_SUITE: Handle the case that HOMEPATH may not be set
Seems that it can happen on Windows.
-rw-r--r--lib/kernel/test/file_name_SUITE.erl7
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/kernel/test/file_name_SUITE.erl b/lib/kernel/test/file_name_SUITE.erl
index be4ef9c394..8923144215 100644
--- a/lib/kernel/test/file_name_SUITE.erl
+++ b/lib/kernel/test/file_name_SUITE.erl
@@ -139,7 +139,12 @@ home_dir(Config) when is_list(Config) ->
test_server:stop_node(Node),
ok
after
- os:putenv(SaveOldName,SaveOldValue),
+ case SaveOldValue of
+ false ->
+ os:unsetenv(SaveOldName);
+ _ ->
+ os:putenv(SaveOldName,SaveOldValue)
+ end,
rm_rf(prim_file,NewHome)
end
catch