summaryrefslogtreecommitdiffstats
path: root/mac/tclMacUtil.c
diff options
context:
space:
mode:
authorjingham <jingham@noemail.net>2000-04-17 01:52:56 (GMT)
committerjingham <jingham@noemail.net>2000-04-17 01:52:56 (GMT)
commit2db35fd9a96982ba59b0a9e6035d1a85aa709b61 (patch)
treec7687deaedbed915eabbec2b874c575d6833f3e5 /mac/tclMacUtil.c
parentb8abc9d5ab1f83545e8ed589226d6bcad06bbc68 (diff)
downloadtcl-2db35fd9a96982ba59b0a9e6035d1a85aa709b61.zip
tcl-2db35fd9a96982ba59b0a9e6035d1a85aa709b61.tar.gz
tcl-2db35fd9a96982ba59b0a9e6035d1a85aa709b61.tar.bz2
Don't append : to folder name if the folder name is empty.
FossilOrigin-Name: bb30f9a4349b49ac2420813c780db61a9465a388
Diffstat (limited to 'mac/tclMacUtil.c')
-rw-r--r--mac/tclMacUtil.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/mac/tclMacUtil.c b/mac/tclMacUtil.c
index fd981c9..51759ef 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.3 1998/11/10 06:49:55 jingham Exp $
+ * RCS: @(#) $Id: tclMacUtil.c,v 1.4 2000/04/17 01:52:56 jingham Exp $
*/
#include "tcl.h"
@@ -351,13 +351,17 @@ FSpPathFromLocation(
* If the file doesn't currently exist we start over. If the
* directory exists everything will work just fine. Otherwise we
* will just fail later. If the object is a directory, append a
- * colon so full pathname ends with colon.
+ * colon so full pathname ends with colon, but only if the name is
+ * not empty. NavServices returns FSSpec's with the parent ID set,
+ * but the name empty...
*/
if (err == fnfErr) {
BlockMoveData(spec, &tempSpec, sizeof(FSSpec));
} else if ( (pb.hFileInfo.ioFlAttrib & ioDirMask) != 0 ) {
- tempSpec.name[0] += 1;
- tempSpec.name[tempSpec.name[0]] = ':';
+ if (tempSpec.name[0] > 0) {
+ tempSpec.name[0] += 1;
+ tempSpec.name[tempSpec.name[0]] = ':';
+ }
}
/*