Tcl Source Code

Artifact [87d982a4cb]
Login

Artifact 87d982a4cb7b73d1e60775b99051f6da15aa4615:

Attachment "tclWinFile.c189-patch" to ticket [1575837fff] added by afredd 2006-10-13 16:41:21.
--- tclWinFile.c189	2006-10-13 09:22:18.496435900 +0100
+++ tclWinFile.c	2006-10-13 10:37:33.926880500 +0100
@@ -2489,13 +2489,13 @@
 	int res;
 	TCHAR *LinkTarget;
 	TCHAR *LinkSource = (TCHAR *) Tcl_FSGetNativePath(pathPtr);
+	Tcl_Obj *normalizedToPtr = Tcl_FSGetNormalizedPath(NULL, toPtr);
 
-	toPtr = Tcl_FSGetNormalizedPath(NULL, toPtr);
-	if (toPtr == NULL) {
+	if (normalizedToPtr == NULL) {
 	    return NULL;
 	}
 
-	LinkTarget = (TCHAR *) Tcl_FSGetNativePath(toPtr);
+	LinkTarget = (TCHAR *) Tcl_FSGetNativePath(normalizedToPtr);
 
 	if (LinkSource == NULL || LinkTarget == NULL) {
 	    return NULL;