diff options
| author | dgp@users.sourceforge.net <dgp> | 2011-10-31 17:04:31 (GMT) |
|---|---|---|
| committer | dgp@users.sourceforge.net <dgp> | 2011-10-31 17:04:31 (GMT) |
| commit | bf16b5fdb8ab12e5373658283e04a29f24c48ce5 (patch) | |
| tree | 4dc6dab0786e1ed7df03bb95f5447f08f2c66792 | |
| parent | 10d3d3de3ea84ef3bbd9dfc516a1846c157a1d2c (diff) | |
| download | tcl-bf16b5fdb8ab12e5373658283e04a29f24c48ce5.zip tcl-bf16b5fdb8ab12e5373658283e04a29f24c48ce5.tar.gz tcl-bf16b5fdb8ab12e5373658283e04a29f24c48ce5.tar.bz2 | |
Purge the old, buggy implementation.
| -rw-r--r-- | generic/tclPathObj.c | 34 |
1 files changed, 0 insertions, 34 deletions
diff --git a/generic/tclPathObj.c b/generic/tclPathObj.c index ab5c4e6..eb19096 100644 --- a/generic/tclPathObj.c +++ b/generic/tclPathObj.c @@ -1367,7 +1367,6 @@ 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 @@ -1382,39 +1381,6 @@ AppendPath( } else { TclpNativeJoinPath(copy, bytes); } -#else - bytes = Tcl_GetStringFromObj(copy, &numBytes); - - /* - * Should we perhaps use 'Tcl_FSPathSeparator'? But then what about the - * Windows special case? Perhaps we should just check if cwd is a root - * volume. We should never get numBytes == 0 in this code path. - */ - - switch (tclPlatform) { - case TCL_PLATFORM_UNIX: - if (bytes[numBytes-1] != '/') { - Tcl_AppendToObj(copy, "/", 1); - } - break; - - case TCL_PLATFORM_WINDOWS: - /* - * We need the extra 'numBytes != 2', and ':' checks because a volume - * relative path doesn't get a '/'. For example 'glob C:*cat*.exe' - * will return 'C:cat32.exe' - */ - - if (bytes[numBytes-1] != '/' && bytes[numBytes-1] != '\\') { - if (numBytes!= 2 || bytes[1] != ':') { - Tcl_AppendToObj(copy, "/", 1); - } - } - break; - } - - Tcl_AppendObjToObj(copy, tail); -#endif return copy; } |
