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 /mac/tclMacUtil.c | |
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 'mac/tclMacUtil.c')
-rw-r--r-- | mac/tclMacUtil.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/mac/tclMacUtil.c b/mac/tclMacUtil.c index a67eeef..ab65815 100644 --- a/mac/tclMacUtil.c +++ b/mac/tclMacUtil.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclMacUtil.c,v 1.6 2002/04/19 14:18:55 das Exp $ + * RCS: @(#) $Id: tclMacUtil.c,v 1.7 2003/03/03 20:22:44 das Exp $ */ #include "tcl.h" @@ -322,7 +322,11 @@ FSpLocationFromPathAlias( if (err != noErr) return err; lastFileSpec=*fileSpecPtr; err = ResolveAliasFile(fileSpecPtr, true, &isDirectory, &wasAlias); - if (err != noErr) return err; + if (err != noErr) { + /* ignore alias resolve errors on last path component */ + if (pos < length) return err; + else *fileSpecPtr=lastFileSpec; + } FSpGetDirectoryID(fileSpecPtr, &dirID, &isDirectory); vRefNum = fileSpecPtr->vRefNum; cur = pos; |