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 | 6740ac50e9a65342cacd77245cacb8ad443dda00 (patch) | |
tree | f4482a0b82fb53236a1951b0d815fc6f2b21a95e /generic/tclFCmd.c | |
parent | 8783392efa27d4df503dc1b7029e8fde6ba03b4a (diff) | |
download | tcl-6740ac50e9a65342cacd77245cacb8ad443dda00.zip tcl-6740ac50e9a65342cacd77245cacb8ad443dda00.tar.gz tcl-6740ac50e9a65342cacd77245cacb8ad443dda00.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) { |