diff options
author | dkf <donal.k.fellows@manchester.ac.uk> | 2014-07-12 16:15:22 (GMT) |
---|---|---|
committer | dkf <donal.k.fellows@manchester.ac.uk> | 2014-07-12 16:15:22 (GMT) |
commit | 985b5f8a7463d8ef8400d49bceb87b402ed70e59 (patch) | |
tree | 488c380d0ec7f4f0e06a4eda59cfddabf2bcc0e3 /generic/tclPathObj.c | |
parent | 7bea42569d8c2ccb8584155f706392d5812ec428 (diff) | |
parent | 74d71bafde63ca49cecadc990df7b3a2d7797849 (diff) | |
download | tcl-985b5f8a7463d8ef8400d49bceb87b402ed70e59.zip tcl-985b5f8a7463d8ef8400d49bceb87b402ed70e59.tar.gz tcl-985b5f8a7463d8ef8400d49bceb87b402ed70e59.tar.bz2 |
merge trunkbug_d5ddbc7f49
Diffstat (limited to 'generic/tclPathObj.c')
-rw-r--r-- | generic/tclPathObj.c | 18 |
1 files changed, 6 insertions, 12 deletions
diff --git a/generic/tclPathObj.c b/generic/tclPathObj.c index fe6063f..99d576d 100644 --- a/generic/tclPathObj.c +++ b/generic/tclPathObj.c @@ -2437,19 +2437,13 @@ SetFsPathFromAny( } TclDecrRefCount(parts); } else { - /* - * Simple case. "rest" is relative path. Just join it. The - * "rest" object will be freed when Tcl_FSJoinToPath returns - * (unless something else claims a refCount on it). - */ - - Tcl_Obj *joined; - Tcl_Obj *rest = Tcl_NewStringObj(name+split+1, -1); + Tcl_Obj *pair[2]; - Tcl_IncrRefCount(transPtr); - joined = Tcl_FSJoinToPath(transPtr, 1, &rest); - TclDecrRefCount(transPtr); - transPtr = joined; + pair[0] = transPtr; + pair[1] = Tcl_NewStringObj(name+split+1, -1); + transPtr = TclJoinPath(2, pair); + Tcl_DecrRefCount(pair[0]); + Tcl_DecrRefCount(pair[1]); } } } else { |