Diff
Not logged in

Differences From Artifact [a297d20693]:

To Artifact [a2e3ff290e]:


13
14
15
16
17
18
19
20

21
22
23
24
25
26
27
13
14
15
16
17
18
19

20
21
22
23
24
25
26
27







-
+







 *
 * Copyright (c) 1991-1994 The Regents of the University of California.
 * Copyright (c) 1994-1997 Sun Microsystems, Inc.
 *
 * 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.77.2.35 2007/12/14 02:29:21 hobbs Exp $
 * RCS: @(#) $Id: tclIOUtil.c,v 1.77.2.36 2008/06/23 15:43:42 dgp Exp $
 */

#include "tclInt.h"
#include "tclPort.h"
#ifdef MAC_TCL
#include "tclMacInt.h"
#endif
5430
5431
5432
5433
5434
5435
5436






5437




5438
5439
5440
5441
5442
5443
5444
5430
5431
5432
5433
5434
5435
5436
5437
5438
5439
5440
5441
5442

5443
5444
5445
5446
5447
5448
5449
5450
5451
5452
5453







+
+
+
+
+
+
-
+
+
+
+








    if (Tcl_FSConvertToPathType(interp, pathPtr) != TCL_OK) {
	return NULL;
    }
    srcFsPathPtr = (FsPath*) PATHOBJ(pathPtr);
    if (srcFsPathPtr->translatedPathPtr == NULL) {
	if (PATHFLAGS(pathPtr) != 0) {
	    /*
	     * We lack a translated path result, but we have a directory
	     * (cwdPtr) and a tail (normPathPtr), and if we join the
	     * translated version of cwdPtr to normPathPtr, we'll get the
	     * translated result we need, and can store it for future use.
	     */
	    retObj = Tcl_FSGetNormalizedPath(interp, pathPtr);
	    retObj = Tcl_FSJoinToPath(Tcl_FSGetTranslatedPath(interp,
	    srcFsPathPtr->cwdPtr), 1, &(srcFsPathPtr->normPathPtr));
	    srcFsPathPtr->translatedPathPtr = retObj;
	    Tcl_IncrRefCount(retObj);
	} else {
	    /* 
	     * It is a pure absolute, normalized path object.
	     * This is something like being a 'pure list'.  The
	     * object's string, translatedPath and normalizedPath
	     * are all identical.
	     */