diff options
| author | vincentdarley <vincentdarley> | 2002-07-20 01:01:40 (GMT) | 
|---|---|---|
| committer | vincentdarley <vincentdarley> | 2002-07-20 01:01:40 (GMT) | 
| commit | 1565e25fd0d4c5dee1908910a2a062560d81ed80 (patch) | |
| tree | 6e6dd36efb02898a9ac963c730001573c6010733 /unix/tclUnixFile.c | |
| parent | ca946034dc6020473c9c02c0bbc824e2084a2dd9 (diff) | |
| download | tcl-1565e25fd0d4c5dee1908910a2a062560d81ed80.zip tcl-1565e25fd0d4c5dee1908910a2a062560d81ed80.tar.gz tcl-1565e25fd0d4c5dee1908910a2a062560d81ed80.tar.bz2 | |
vfs fixes
Diffstat (limited to 'unix/tclUnixFile.c')
| -rw-r--r-- | unix/tclUnixFile.c | 12 | 
1 files changed, 8 insertions, 4 deletions
| diff --git a/unix/tclUnixFile.c b/unix/tclUnixFile.c index 4c4dfa0..3105d21 100644 --- a/unix/tclUnixFile.c +++ b/unix/tclUnixFile.c @@ -9,7 +9,7 @@   * See the file "license.terms" for information on usage and redistribution   * of this file, and for a DISCLAIMER OF ALL WARRANTIES.   * - * RCS: @(#) $Id: tclUnixFile.c,v 1.26 2002/07/19 12:31:10 dkf Exp $ + * RCS: @(#) $Id: tclUnixFile.c,v 1.27 2002/07/20 01:01:41 vincentdarley Exp $   */  #include "tclInt.h" @@ -687,7 +687,7 @@ TclpReadlink(path, linkPtr)      Tcl_ExternalToUtfDString(NULL, link, length, linkPtr);      return Tcl_DStringValue(linkPtr);  #else -	return NULL; +    return NULL;  #endif  } @@ -765,7 +765,8 @@ TclpObjLink(pathPtr, toPtr, linkAction)  	char link[MAXPATHLEN];  	int length;  	char *native; - +	Tcl_DString ds; +	  	if (Tcl_FSGetTranslatedPath(NULL, pathPtr) == NULL) {  	    return NULL;  	} @@ -782,7 +783,10 @@ TclpObjLink(pathPtr, toPtr, linkAction)  	strncpy(native, link, (unsigned)length);  	native[length] = '\0'; -	linkPtr = Tcl_FSNewNativePath(&tclNativeFilesystem, native); +	Tcl_ExternalToUtfDString(NULL, native, length, &ds); +	linkPtr = Tcl_NewStringObj(Tcl_DStringValue(&ds),  +				   Tcl_DStringLength(&ds)); +	Tcl_DStringFree(&ds);  	if (linkPtr != NULL) {  	    Tcl_IncrRefCount(linkPtr);  	} | 
