diff options
author | dgp <dgp@users.sourceforge.net> | 2011-10-27 14:03:15 (GMT) |
---|---|---|
committer | dgp <dgp@users.sourceforge.net> | 2011-10-27 14:03:15 (GMT) |
commit | 61c12b1ae1bd6588b6dfa3ebfaa2520fd3ecc7d9 (patch) | |
tree | e477205ee006ca0927446fb29b09c9d7c13dec67 /generic/tclPathObj.c | |
parent | 5ca626b4e6d4c45aa0ba1798b382251f70625de7 (diff) | |
download | tcl-61c12b1ae1bd6588b6dfa3ebfaa2520fd3ecc7d9.zip tcl-61c12b1ae1bd6588b6dfa3ebfaa2520fd3ecc7d9.tar.gz tcl-61c12b1ae1bd6588b6dfa3ebfaa2520fd3ecc7d9.tar.bz2 |
Proposed fix for 3414754
Diffstat (limited to 'generic/tclPathObj.c')
-rw-r--r-- | generic/tclPathObj.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/generic/tclPathObj.c b/generic/tclPathObj.c index 8840e4a..ab5c4e6 100644 --- a/generic/tclPathObj.c +++ b/generic/tclPathObj.c @@ -1367,6 +1367,22 @@ AppendPath( const char *bytes; Tcl_Obj *copy = Tcl_DuplicateObj(head); +#if 1 + /* + * This is likely buggy when dealing with virtual filesystem drivers + * that use some character other than "/" as a path separator. I know + * of no evidence that such a foolish thing exists. This solution was + * chosen so that "JoinPath" operations that pass through either path + * intrep produce the same results; that is, bugward compatibility. If + * we need to fix that bug here, it needs fixing in Tcl_FSJoinPath() too. + */ + bytes = Tcl_GetStringFromObj(tail, &numBytes); + if (numBytes == 0) { + Tcl_AppendToObj(copy, "/", 1); + } else { + TclpNativeJoinPath(copy, bytes); + } +#else bytes = Tcl_GetStringFromObj(copy, &numBytes); /* @@ -1398,6 +1414,7 @@ AppendPath( } Tcl_AppendObjToObj(copy, tail); +#endif return copy; } |