summaryrefslogtreecommitdiffstats
path: root/win
diff options
context:
space:
mode:
Diffstat (limited to 'win')
-rw-r--r--win/tclWinFile.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/win/tclWinFile.c b/win/tclWinFile.c
index 1e84315..41e1733 100644
--- a/win/tclWinFile.c
+++ b/win/tclWinFile.c
@@ -11,7 +11,7 @@
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclWinFile.c,v 1.88 2006/10/01 21:30:04 patthoyts Exp $
+ * RCS: @(#) $Id: tclWinFile.c,v 1.89 2006/10/13 04:53:51 coldstore Exp $
*/
/* #define _WIN32_WINNT 0x0500 */
@@ -2486,13 +2486,17 @@ TclpObjLink(
int linkAction)
{
if (toPtr != NULL) {
- toPtr = Tcl_FSGetNormalizedPath(NULL, toPtr);
- }
- if (toPtr != NULL) {
int res;
- TCHAR *LinkTarget = (TCHAR *) Tcl_FSGetNativePath(toPtr);
+ TCHAR *LinkTarget;
TCHAR *LinkSource = (TCHAR *) Tcl_FSGetNativePath(pathPtr);
+ toPtr = Tcl_FSGetNormalizedPath(NULL, toPtr);
+ if (toPtr == NULL) {
+ return NULL;
+ }
+
+ LinkTarget = (TCHAR *) Tcl_FSGetNativePath(toPtr);
+
if (LinkSource == NULL || LinkTarget == NULL) {
return NULL;
}