diff options
author | Björn Gustavsson <[email protected]> | 2014-06-12 12:07:40 +0200 |
---|---|---|
committer | Björn Gustavsson <[email protected]> | 2014-06-12 12:07:40 +0200 |
commit | bb6e764343e6cacc150f2233a0470a6194cca45d (patch) | |
tree | 65eb49470d4bebcdff8cdf7cfcd28749bb79bfe5 /lib | |
parent | dc7a9868aa1259f729f8437d92a7948ba1098401 (diff) | |
parent | 9eccead7d89673648318815716b73f6d50ec068b (diff) | |
download | otp-bb6e764343e6cacc150f2233a0470a6194cca45d.tar.gz otp-bb6e764343e6cacc150f2233a0470a6194cca45d.tar.bz2 otp-bb6e764343e6cacc150f2233a0470a6194cca45d.zip |
Merge branch 'bjorn/kernel/stick-preloaded/OTP-11913' into maint
* bjorn/kernel/stick-preloaded/OTP-11913:
Allow unsticking pre-loaded modules
Diffstat (limited to 'lib')
-rw-r--r-- | lib/kernel/src/code_server.erl | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/lib/kernel/src/code_server.erl b/lib/kernel/src/code_server.erl index dd06affd70..819554ce74 100644 --- a/lib/kernel/src/code_server.erl +++ b/lib/kernel/src/code_server.erl @@ -1168,7 +1168,7 @@ stick_dir(Dir, Stick, St) -> true -> foreach(fun (M) -> ets:insert(Db, {{sticky,M},true}) end, Mods); false -> - foreach(fun (M) -> do_unstick_mod(Db, M) end, Mods) + foreach(fun (M) -> ets:delete(Db, {sticky,M}) end, Mods) end; Error -> Error @@ -1180,15 +1180,6 @@ stick_mod(M, Stick, St) -> true -> ets:insert(Db, {{sticky,M},true}); false -> - do_unstick_mod(Db, M) - end. - -do_unstick_mod(Db, M) -> - case ets:lookup(Db, M) of - [{M,preloaded}] -> - %% Never unstick pre-loaded modules. - true; - _ -> ets:delete(Db, {sticky,M}) end. |