diff options
author | dgp <dgp@users.sourceforge.net> | 2012-01-27 21:56:52 (GMT) |
---|---|---|
committer | dgp <dgp@users.sourceforge.net> | 2012-01-27 21:56:52 (GMT) |
commit | 3ce75ba99bee47c73c4297edafde3870246fdc8c (patch) | |
tree | f4482a0b82fb53236a1951b0d815fc6f2b21a95e /generic/tclFCmd.c | |
parent | 9e0ba8cbb336116eaf358482ed7f81e0dbce73db (diff) | |
download | tcl-3ce75ba99bee47c73c4297edafde3870246fdc8c.zip tcl-3ce75ba99bee47c73c4297edafde3870246fdc8c.tar.gz tcl-3ce75ba99bee47c73c4297edafde3870246fdc8c.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.c | 5 |
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) { |