aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPatrik Nyblom <[email protected]>2010-12-01 17:46:45 +0100
committerPatrik Nyblom <[email protected]>2010-12-01 17:46:45 +0100
commit47c0ced5a05874c3cbfdad532abbd8900c40e966 (patch)
treef6f9911c9ccd026df085242c932b9253dc15ad1c
parent3e6877b06ae395a9d4310ef664d0360867a47f62 (diff)
downloadotp-47c0ced5a05874c3cbfdad532abbd8900c40e966.tar.gz
otp-47c0ced5a05874c3cbfdad532abbd8900c40e966.tar.bz2
otp-47c0ced5a05874c3cbfdad532abbd8900c40e966.zip
Correct bug in file_name_SUITE making it fail on Unix instead of Windows7
-rw-r--r--lib/kernel/test/file_name_SUITE.erl9
1 files changed, 8 insertions, 1 deletions
diff --git a/lib/kernel/test/file_name_SUITE.erl b/lib/kernel/test/file_name_SUITE.erl
index 02b8d12478..8829e93473 100644
--- a/lib/kernel/test/file_name_SUITE.erl
+++ b/lib/kernel/test/file_name_SUITE.erl
@@ -506,6 +506,7 @@ check_very_icky(Mod) ->
{NumOK0,NumNOK0}
end,
?line {NumOK,NumNOK} = filelib:fold_files(".",".*",true,fun(_F,{N,M}) when is_list(_F) -> io:format("~ts~n",[_F]),{N+1,M}; (_F,{N,M}) -> io:format("~p~n",[_F]),{N,M+1} end,{0,0}),
+ ?line ok = filelib:fold_files(".",[1076,1089,1072,124,46,42],true,fun(_F,_) -> ok end,false),
ok
catch
throw:need_unicode_mode ->
@@ -727,8 +728,14 @@ treat_icky(Bin) ->
Bin
end.
+% Handle windows having absolute soft link targets.
fixlink({ok,Link}) ->
- {ok,filename:basename(Link)};
+ case os:type() of
+ {win32,_} ->
+ {ok,filename:basename(Link)};
+ _ ->
+ {ok,Link}
+ end;
fixlink(X) ->
X.