diff options
author | das <das> | 2003-03-03 20:22:35 (GMT) |
---|---|---|
committer | das <das> | 2003-03-03 20:22:35 (GMT) |
commit | 55bb78dc4fdf14318cfcbbeb264b7ef0a3e0a57e (patch) | |
tree | 775cc0d3807a1e773d6bf08be556d649fee410ef /generic | |
parent | dcffed8c8901fe70eb77440945d36aad3f95b6e9 (diff) | |
download | tcl-55bb78dc4fdf14318cfcbbeb264b7ef0a3e0a57e.zip tcl-55bb78dc4fdf14318cfcbbeb264b7ef0a3e0a57e.tar.gz tcl-55bb78dc4fdf14318cfcbbeb264b7ef0a3e0a57e.tar.bz2 |
Mac OS Classic specific fixes:core_8_4_2
* generic/tclIOUtil.c (TclNewFSPathObj): on TCL_PLATFORM_MAC,
skip potential directory separator at the beginning of addStrRep.
* mac/tclMacChan.c (OpenFileChannel, CommonWatch): followup
fixes to cut and splice implementation for file channels.
* mac/tclMacFile.c (TclpUtime): pass native path to utime().
* mac/tclMacFile.c (TclpObjLink): correctly implemented creation
of alias files via new static proc CreateAliasFile().
* mac/tclMacPort.h: define S_ISLNK macro to fix stat'ing of links.
* mac/tclMacUtil.c (FSpLocationFromPathAlias): fix to enable
stat'ing of broken links.
Diffstat (limited to 'generic')
-rw-r--r-- | generic/tclIOUtil.c | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/generic/tclIOUtil.c b/generic/tclIOUtil.c index 43c9f5a..29ba700 100644 --- a/generic/tclIOUtil.c +++ b/generic/tclIOUtil.c @@ -17,7 +17,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclIOUtil.c,v 1.76 2003/02/27 23:47:16 hobbs Exp $ + * RCS: @(#) $Id: tclIOUtil.c,v 1.77 2003/03/03 20:22:41 das Exp $ */ #include "tclInt.h" @@ -4020,6 +4020,18 @@ TclNewFSPathObj(Tcl_Obj *dirPtr, CONST char *addStrRep, int len) objPtr = Tcl_NewObj(); fsPathPtr = (FsPath*)ckalloc((unsigned)sizeof(FsPath)); + if (tclPlatform == TCL_PLATFORM_MAC) { + /* + * Mac relative paths may begin with a directory separator ':'. + * If present, we need to skip this ':' because we assume that + * we can join dirPtr and addStrRep by concatenating them as + * strings (and we ensure that dirPtr is terminated by a ':'). + */ + if (addStrRep[0] == ':') { + addStrRep++; + len--; + } + } /* Setup the path */ fsPathPtr->translatedPathPtr = NULL; fsPathPtr->normPathPtr = Tcl_NewStringObj(addStrRep, len); |