summaryrefslogtreecommitdiffstats
path: root/generic/tclPathObj.c
diff options
context:
space:
mode:
authorvincentdarley <vincentdarley>2004-04-23 12:09:30 (GMT)
committervincentdarley <vincentdarley>2004-04-23 12:09:30 (GMT)
commit995406ac5bb7813c75343919fde68ba897545f06 (patch)
tree8a90a6e6222b9614f909ed276c67f3290879547c /generic/tclPathObj.c
parent88bdeb9f3a0d24c6a2034eeddb37c8581b64823b (diff)
downloadtcl-995406ac5bb7813c75343919fde68ba897545f06.zip
tcl-995406ac5bb7813c75343919fde68ba897545f06.tar.gz
tcl-995406ac5bb7813c75343919fde68ba897545f06.tar.bz2
fix to two filesystem bugs: more consistent file separator proc and correct Tcl_FSJoinPath return values
Diffstat (limited to 'generic/tclPathObj.c')
-rw-r--r--generic/tclPathObj.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/generic/tclPathObj.c b/generic/tclPathObj.c
index daa9297..bcb1500 100644
--- a/generic/tclPathObj.c
+++ b/generic/tclPathObj.c
@@ -10,7 +10,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclPathObj.c,v 1.29 2004/04/06 22:25:54 dgp Exp $
+ * RCS: @(#) $Id: tclPathObj.c,v 1.30 2004/04/23 12:09:37 vincentdarley Exp $
*/
#include "tclInt.h"
@@ -672,7 +672,12 @@ GetExtension(pathPtr)
* Results:
* Returns object with refCount of zero, (or if non-zero, it has
* references elsewhere in Tcl). Either way, the caller must
- * increment its refCount before use.
+ * increment its refCount before use. Note that in the case where
+ * the caller has asked to join zero elements of the list, the
+ * return value will be an empty-string Tcl_Obj.
+ *
+ * If the given listObj was invalid, then the calling routine has
+ * a bug, and this function will just return NULL.
*
* Side effects:
* None.
@@ -918,6 +923,9 @@ Tcl_FSJoinPath(listObj, elements)
Tcl_SetObjLength(res, length);
}
}
+ if (res == NULL) {
+ res = Tcl_NewObj();
+ }
return res;
}