aboutsummaryrefslogtreecommitdiffstats
path: root/lib/kernel/test
diff options
context:
space:
mode:
authorJohn Högberg <[email protected]>2019-03-21 17:31:47 +0100
committerJohn Högberg <[email protected]>2019-03-22 09:38:15 +0100
commit526bc873d91b134ffab0c484553d42a510bccd96 (patch)
tree24a0983d0d6f9cc188a1a44fa2af73e9e1fe8781 /lib/kernel/test
parent22868eccf702d49c5813f0ab060fc86d67342b85 (diff)
downloadotp-526bc873d91b134ffab0c484553d42a510bccd96.tar.gz
otp-526bc873d91b134ffab0c484553d42a510bccd96.tar.bz2
otp-526bc873d91b134ffab0c484553d42a510bccd96.zip
erts: Fix incorrect UNC path length calculation
This didn't cause any issues for the most part since the path was still properly formed, but it broke down when appending the wildcards in file:list_dir/1. The ASSERT_PATH_FORMAT macro would have caught this in no time, but it went unnoticed because we don't run debug builds on Windows.
Diffstat (limited to 'lib/kernel/test')
-rw-r--r--lib/kernel/test/file_SUITE.erl3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/kernel/test/file_SUITE.erl b/lib/kernel/test/file_SUITE.erl
index a51025cba6..711ffccb67 100644
--- a/lib/kernel/test/file_SUITE.erl
+++ b/lib/kernel/test/file_SUITE.erl
@@ -2191,6 +2191,9 @@ unc_paths(Config) when is_list(Config) ->
{ok, _} = file:read_file_info("C:\\Windows\\explorer.exe"),
{ok, _} = file:read_file_info("\\\\localhost\\c$\\Windows\\explorer.exe"),
+ {ok, Files} = file:list_dir("C:\\Windows\\"),
+ {ok, Files} = file:list_dir("\\\\localhost\\c$\\Windows\\"),
+
{ok, Cwd} = file:get_cwd(),
try