diff --git a/tcltk/tkcon.tcl b/tcltk/tkcon.tcl index bb25659e..1f1b7cab 100755 --- a/tcltk/tkcon.tcl +++ b/tcltk/tkcon.tcl @@ -249,6 +249,9 @@ proc ::tkcon::Init {} { if {![info exists PRIV(histfile)]} { set PRIV(histfile) [file join $env($envHome) $histfile] } + } else { + set PRIV(rcfile) "" + set PRIV(histfile) "" } ## Handle command line arguments before sourcing resource file to diff --git a/utils/main.c b/utils/main.c index fe679d0f..3fabc6ca 100644 --- a/utils/main.c +++ b/utils/main.c @@ -988,7 +988,8 @@ mainInitFinal() } } - if (getcwd(cwd, 512) == NULL || strcmp(cwd, home) || (RCFileName[0] == '/')) + if (getcwd(cwd, 512) == NULL || ((home != NULL) && (strcmp(cwd, home))) + || (RCFileName[0] == '/')) { /* Read in the .magicrc file from the current directory, if */ /* different from HOME. */