summaryrefslogtreecommitdiffstats
path: root/generic/tclFCmd.c
diff options
context:
space:
mode:
authordgp@users.sourceforge.net <dgp>2012-01-27 21:56:52 (GMT)
committerdgp@users.sourceforge.net <dgp>2012-01-27 21:56:52 (GMT)
commitfb41e35e8404a5319f9898db843ed4227fbd3532 (patch)
treef4482a0b82fb53236a1951b0d815fc6f2b21a95e /generic/tclFCmd.c
parent053cb0f5441710c796513e50e0214a8a09423928 (diff)
downloadtcl-fb41e35e8404a5319f9898db843ed4227fbd3532.zip
tcl-fb41e35e8404a5319f9898db843ed4227fbd3532.tar.gz
tcl-fb41e35e8404a5319f9898db843ed4227fbd3532.tar.bz2
3479689 New internal routine TclJoinPath().
Refactor all the *Join*Path* routines to give them more useful interfaces that are easier to manage getting the refcounts right.
Diffstat (limited to 'generic/tclFCmd.c')
-rw-r--r--generic/tclFCmd.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/generic/tclFCmd.c b/generic/tclFCmd.c
index 0d90094..e95a136 100644
--- a/generic/tclFCmd.c
+++ b/generic/tclFCmd.c
@@ -177,7 +177,6 @@ FileCopyRename(
for ( ; i<objc-1 ; i++) {
Tcl_Obj *jargv[2];
Tcl_Obj *source, *newFileName;
- Tcl_Obj *temp;
source = FileBasename(interp, objv[i]);
if (source == NULL) {
@@ -186,13 +185,11 @@ FileCopyRename(
}
jargv[0] = objv[objc - 1];
jargv[1] = source;
- temp = Tcl_NewListObj(2, jargv);
- newFileName = Tcl_FSJoinPath(temp, -1);
+ newFileName = TclJoinPath(2, jargv);
Tcl_IncrRefCount(newFileName);
result = CopyRenameOneFile(interp, objv[i], newFileName, copyFlag,
force);
Tcl_DecrRefCount(newFileName);
- Tcl_DecrRefCount(temp);
Tcl_DecrRefCount(source);
if (result == TCL_ERROR) {