aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBjörn-Egil Dahlberg <[email protected]>2016-07-21 16:51:13 +0200
committerBjörn-Egil Dahlberg <[email protected]>2016-07-21 16:51:13 +0200
commit2405a73c71773a2893ee483a72f6d13936a24b47 (patch)
tree5882a2cd325d9a42a5763d1974707bc2206406c8
parent9cdf92fc35006d34d7029ef0fc34c0daf9e1330b (diff)
parent7775d7318deae8aee766b68f5512bf06b11fe598 (diff)
downloadotp-2405a73c71773a2893ee483a72f6d13936a24b47.tar.gz
otp-2405a73c71773a2893ee483a72f6d13936a24b47.tar.bz2
otp-2405a73c71773a2893ee483a72f6d13936a24b47.zip
Merge branch 'maint'
-rw-r--r--lib/kernel/src/code_server.erl20
1 files changed, 13 insertions, 7 deletions
diff --git a/lib/kernel/src/code_server.erl b/lib/kernel/src/code_server.erl
index 6174136507..1792f9e908 100644
--- a/lib/kernel/src/code_server.erl
+++ b/lib/kernel/src/code_server.erl
@@ -933,14 +933,20 @@ del_ebin(Dir) ->
filename:join(del_ebin_1(filename:split(Dir))).
del_ebin_1([Parent,App,"ebin"]) ->
- Ext = archive_extension(),
- case filename:basename(Parent, Ext) of
- Parent ->
- %% Plain directory.
+ case filename:basename(Parent) of
+ [] ->
+ %% Parent is the root directory
[Parent,App];
- Archive ->
- %% Archive.
- [Archive]
+ _ ->
+ Ext = archive_extension(),
+ case filename:basename(Parent, Ext) of
+ Parent ->
+ %% Plain directory.
+ [Parent,App];
+ Archive ->
+ %% Archive.
+ [Archive]
+ end
end;
del_ebin_1([H|T]) ->
[H|del_ebin_1(T)];