aboutsummaryrefslogtreecommitdiffstats
path: root/lib/kernel/src/code_server.erl
diff options
context:
space:
mode:
authorBjörn Gustavsson <[email protected]>2014-05-26 15:15:33 +0200
committerBjörn Gustavsson <[email protected]>2014-05-26 15:54:12 +0200
commitd8fa3de932d97db3a93520ac30f60045e8a9cef4 (patch)
treea30a2c3baa40ebaf27ea666df84d679992673f91 /lib/kernel/src/code_server.erl
parentce2ea545b8833b8e31322cdcff82f14a9cad8ba8 (diff)
downloadotp-d8fa3de932d97db3a93520ac30f60045e8a9cef4.tar.gz
otp-d8fa3de932d97db3a93520ac30f60045e8a9cef4.tar.bz2
otp-d8fa3de932d97db3a93520ac30f60045e8a9cef4.zip
Teach code:del_path/1 to ignore superfluous slashes
The following sequence will NOT leave the code path unchanged: code:add_path("/some/app/"), . . . code:del_path("/some/app/") The reason is that code:add_path/1 will normalize the path name (removing the trailing slash), while code:del_path/1 does not normalize the path before searching for it in the code path.
Diffstat (limited to 'lib/kernel/src/code_server.erl')
-rw-r--r--lib/kernel/src/code_server.erl2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/kernel/src/code_server.erl b/lib/kernel/src/code_server.erl
index fc7ac08699..f891cb61c4 100644
--- a/lib/kernel/src/code_server.erl
+++ b/lib/kernel/src/code_server.erl
@@ -988,7 +988,7 @@ try_archive_subdirs(_Archive, Base, []) ->
%% the complete directory name.
%%
del_path(Name0,Path,NameDb) ->
- case catch to_list(Name0)of
+ case catch filename:join([to_list(Name0)]) of
{'EXIT',_} ->
{{error,bad_name},Path};
Name ->