diff options
| author | hypnotoad <yoda@etoyoc.com> | 2015-10-26 04:02:36 (GMT) |
|---|---|---|
| committer | hypnotoad <yoda@etoyoc.com> | 2015-10-26 04:02:36 (GMT) |
| commit | 90b38da321e1b5d5885e4d4f57c8e8bc46a00793 (patch) | |
| tree | 21fefd2f79c00cd95297dea6fce75902ffe07ba1 /unix/tclUnixFile.c | |
| parent | e448db56ee02e80b29e2fc3c2d07313e592ba554 (diff) | |
| parent | 3fc99c04f6169eb97c2581310c254aefc9e14d6a (diff) | |
| download | tcl-90b38da321e1b5d5885e4d4f57c8e8bc46a00793.zip tcl-90b38da321e1b5d5885e4d4f57c8e8bc46a00793.tar.gz tcl-90b38da321e1b5d5885e4d4f57c8e8bc46a00793.tar.bz2 | |
Merged with trunk, fixes to allow builds outside of the tcl/unix|win directory
Diffstat (limited to 'unix/tclUnixFile.c')
| -rw-r--r-- | unix/tclUnixFile.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/unix/tclUnixFile.c b/unix/tclUnixFile.c index 2cb0027..7ffbf8d 100644 --- a/unix/tclUnixFile.c +++ b/unix/tclUnixFile.c @@ -155,6 +155,11 @@ TclpFindExecutable( goto done; } + if (TclpGetCwd(NULL, &cwd) == NULL) { + TclSetObjNameOfExecutable(Tcl_NewObj(), NULL); + goto done; + } + /* * The name is relative to the current working directory. First strip off * a leading "./", if any, then add the full path name of the current @@ -168,8 +173,6 @@ TclpFindExecutable( Tcl_DStringInit(&nameString); Tcl_DStringAppend(&nameString, name, -1); - TclpGetCwd(NULL, &cwd); - Tcl_DStringFree(&buffer); Tcl_UtfToExternalDString(NULL, Tcl_DStringValue(&cwd), Tcl_DStringLength(&cwd), &buffer); |
