summaryrefslogtreecommitdiffstats
path: root/generic/tclFCmd.c
diff options
context:
space:
mode:
authordgp <dgp@noemail.net>2012-01-27 21:56:52 (GMT)
committerdgp <dgp@noemail.net>2012-01-27 21:56:52 (GMT)
commit286099cf99a695b5e64c685d222cda59c2927382 (patch)
treef4482a0b82fb53236a1951b0d815fc6f2b21a95e /generic/tclFCmd.c
parent2a8463ea617f902adea62ca2ba4191c6db2f49ff (diff)
downloadtcl-286099cf99a695b5e64c685d222cda59c2927382.zip
tcl-286099cf99a695b5e64c685d222cda59c2927382.tar.gz
tcl-286099cf99a695b5e64c685d222cda59c2927382.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. FossilOrigin-Name: 55c8c6c1552f0cd51a3b76c0ca7a6ddf3e514ad0
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) {