blob: c848752958b4a23cefb6f91840c2eed03a11c99e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
diff -up modules-3.2.10/ModuleCmd_Load.c.unload_from_modulefile modules-3.2.10/ModuleCmd_Load.c
--- modules-3.2.10/ModuleCmd_Load.c.unload_from_modulefile 2014-07-08 10:43:41.615212949 +0200
+++ modules-3.2.10/ModuleCmd_Load.c 2014-07-08 13:49:21.674701003 +0200
@@ -126,7 +126,7 @@ int ModuleCmd_Load( Tcl_Interp *interp,
** Set up the flags controling the Tcl callback functions
**/
- /* avoid changes when invoked as a subcommand */
+ /* avoid changes when invoked as a subcommand and loading */
if (!(g_flags & M_SUBCMD)) {
if( load) {
g_flags |= M_LOAD;
@@ -136,6 +136,11 @@ int ModuleCmd_Load( Tcl_Interp *interp,
g_flags &= ~M_LOAD;
}
g_flags |= M_SUBCMD;
+ } else {
+ if (!load) {
+ g_flags |= M_REMOVE;
+ g_flags &= ~M_LOAD;
+ }
}
/**
|