From 0925058a5fdf90de95122b934d995f609a075594 Mon Sep 17 00:00:00 2001 From: Hans Svensson Date: Thu, 23 Jan 2014 10:16:12 +0100 Subject: lib/ssh - Replace reverse(tl(reverse(L))) with lists:droplast/1 --- lib/ssh/src/ssh_sftpd.erl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/ssh') diff --git a/lib/ssh/src/ssh_sftpd.erl b/lib/ssh/src/ssh_sftpd.erl index 174ca0126b..50cbdd5e45 100644 --- a/lib/ssh/src/ssh_sftpd.erl +++ b/lib/ssh/src/ssh_sftpd.erl @@ -675,7 +675,7 @@ resolve_symlinks_2(["." | RestPath], State0, LinkCnt, AccPath) -> resolve_symlinks_2([".." | RestPath], State0, LinkCnt, AccPath) -> %% Remove the last path component AccPathComps0 = filename:split(AccPath), - Path = case lists:reverse(tl(lists:reverse(AccPathComps0))) of + Path = case lists:droplast(AccPathComps0))) of [] -> ""; AccPathComps -> -- cgit v1.2.3 From 55222b92e84960c66fcd1a220c54917f3dfbda2e Mon Sep 17 00:00:00 2001 From: Hans Svensson Date: Thu, 23 Jan 2014 10:18:37 +0100 Subject: lib/mnesia/test/ - Replace reverse(tl(reverse(L))) with lists:droplast/1 --- lib/ssh/src/ssh_sftpd.erl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/ssh') diff --git a/lib/ssh/src/ssh_sftpd.erl b/lib/ssh/src/ssh_sftpd.erl index 50cbdd5e45..2bc68e62bb 100644 --- a/lib/ssh/src/ssh_sftpd.erl +++ b/lib/ssh/src/ssh_sftpd.erl @@ -675,7 +675,7 @@ resolve_symlinks_2(["." | RestPath], State0, LinkCnt, AccPath) -> resolve_symlinks_2([".." | RestPath], State0, LinkCnt, AccPath) -> %% Remove the last path component AccPathComps0 = filename:split(AccPath), - Path = case lists:droplast(AccPathComps0))) of + Path = case lists:droplast(AccPathComps0) of [] -> ""; AccPathComps -> -- cgit v1.2.3