Only in tcl-dev/: .#ChangeLog
Only in tcl-dev/: debian
diff --exclude Root -c -r tcl/generic/tclIOUtil.c tcl-dev/generic/tclIOUtil.c
*** tcl/generic/tclIOUtil.c	2006-08-22 00:56:48.000000000 +1000
--- tcl-dev/generic/tclIOUtil.c	2006-08-29 09:52:14.000000000 +1000
***************
*** 1234,1239 ****
--- 1234,1240 ----
  	    int len, mlen;
  	    CONST char *path;
  	    CONST char *mount;
+ 	    Tcl_Obj *norm;
  
  	    /*
  	     * We know mElt is absolute normalized and lies inside pathPtr, so
***************
*** 1242,1259 ****
  	     */
  
  	    mount = Tcl_GetStringFromObj(mElt, &mlen);
! 	    path = Tcl_GetStringFromObj(Tcl_FSGetNormalizedPath(NULL, pathPtr),
! 		    &len);
! 	    if (path[len-1] == '/') {
! 		/*
! 		 * Deal with the root of the volume.
! 		 */
  
! 		len--;
  	    }
- 	    mElt = TclNewFSPathObj(pathPtr, mount + len + 1, mlen - len);
- 	    Tcl_ListObjAppendElement(NULL, resultPtr, mElt);
- 
  	    /*
  	     * No need to increment gLength, since we don't want to compare
  	     * mounts against mounts.
--- 1243,1261 ----
  	     */
  
  	    mount = Tcl_GetStringFromObj(mElt, &mlen);
! 	    norm = Tcl_FSGetNormalizedPath(NULL, pathPtr);
! 	    if (norm != NULL) {
! 		path = Tcl_GetStringFromObj(norm, &len);
! 		if (path[len-1] == '/') {
! 		    /*
! 		     * Deal with the root of the volume.
! 		     */
  
! 		    len--;
! 		}
! 		mElt = TclNewFSPathObj(pathPtr, mount + len + 1, mlen - len);
! 		Tcl_ListObjAppendElement(NULL, resultPtr, mElt);
  	    }
  	    /*
  	     * No need to increment gLength, since we don't want to compare
  	     * mounts against mounts.
diff --exclude Root -c -r tcl/generic/tclPathObj.c tcl-dev/generic/tclPathObj.c
*** tcl/generic/tclPathObj.c	2006-04-08 00:05:29.000000000 +1000
--- tcl-dev/generic/tclPathObj.c	2006-08-29 09:53:12.000000000 +1000
***************
*** 1599,1605 ****
  	retObj = srcFsPathPtr->translatedPathPtr;
      }
  
!     Tcl_IncrRefCount(retObj);
      return retObj;
  }
  
--- 1599,1607 ----
  	retObj = srcFsPathPtr->translatedPathPtr;
      }
  
!     if (retObj != NULL) {
! 	Tcl_IncrRefCount(retObj);
!     }
      return retObj;
  }
  
diff --exclude Root -c -r tcl/unix/tclUnixFile.c tcl-dev/unix/tclUnixFile.c
*** tcl/unix/tclUnixFile.c	2006-03-25 12:47:56.000000000 +1100
--- tcl-dev/unix/tclUnixFile.c	2006-08-29 09:54:10.000000000 +1000
***************
*** 1089,1094 ****
--- 1089,1097 ----
  	 */
  
  	validPathPtr = Tcl_FSGetNormalizedPath(NULL, pathPtr);
+ 	if (validPathPtr == NULL) {
+ 	    return NULL;
+ 	}
  	Tcl_IncrRefCount(validPathPtr);
      }
  
diff --exclude Root -c -r tcl/win/tclWinFCmd.c tcl-dev/win/tclWinFCmd.c
*** tcl/win/tclWinFCmd.c	2005-12-14 09:43:18.000000000 +1100
--- tcl-dev/win/tclWinFCmd.c	2006-08-29 10:00:19.000000000 +1000
***************
*** 925,932 ****
      int ret;
  
      normSrcPtr = Tcl_FSGetNormalizedPath(NULL,srcPathPtr);
-     Tcl_WinUtfToTChar(Tcl_GetString(normSrcPtr), -1, &srcString);
      normDestPtr = Tcl_FSGetNormalizedPath(NULL,destPathPtr);
      Tcl_WinUtfToTChar(Tcl_GetString(normDestPtr), -1, &dstString);
  
      ret = TraverseWinTree(TraversalCopy, &srcString, &dstString, &ds);
--- 925,936 ----
      int ret;
  
      normSrcPtr = Tcl_FSGetNormalizedPath(NULL,srcPathPtr);
      normDestPtr = Tcl_FSGetNormalizedPath(NULL,destPathPtr);
+     if ((normSrcPtr == NULL) || (normDestPtr == NULL)) {
+ 	return TCL_ERROR;
+     }
+ 
+     Tcl_WinUtfToTChar(Tcl_GetString(normSrcPtr), -1, &srcString);
      Tcl_WinUtfToTChar(Tcl_GetString(normDestPtr), -1, &dstString);
  
      ret = TraverseWinTree(TraversalCopy, &srcString, &dstString, &ds);
***************
*** 996,1001 ****
--- 1000,1008 ----
  
  	Tcl_DString native;
  	normPtr = Tcl_FSGetNormalizedPath(NULL, pathPtr);
+ 	if (normPtr == NULL) {
+ 	    return TCL_ERROR;
+ 	}
  	Tcl_WinUtfToTChar(Tcl_GetString(normPtr), -1, &native);
  	ret = DoRemoveDirectory(&native, recursive, &ds);
  	Tcl_DStringFree(&native);
diff --exclude Root -c -r tcl/win/tclWinFile.c tcl-dev/win/tclWinFile.c
*** tcl/win/tclWinFile.c	2006-03-15 06:34:30.000000000 +1100
--- tcl-dev/win/tclWinFile.c	2006-08-29 10:02:48.000000000 +1000
***************
*** 2483,2495 ****
      int linkAction)
  {
      if (toPtr != NULL) {
  	int res;
- #if 0
  	TCHAR *LinkTarget = (TCHAR *) Tcl_FSGetNativePath(toPtr);
- #else
- 	TCHAR *LinkTarget = (TCHAR *) Tcl_FSGetNativePath(
- 		Tcl_FSGetNormalizedPath(NULL, toPtr));
- #endif
  	TCHAR *LinkSource = (TCHAR *) Tcl_FSGetNativePath(pathPtr);
  
  	if (LinkSource == NULL || LinkTarget == NULL) {
--- 2483,2493 ----
      int linkAction)
  {
      if (toPtr != NULL) {
+ 	toPtr = Tcl_FSGetNormalizedPath(NULL, toPtr);
+     }
+     if (toPtr != NULL) {
  	int res;
  	TCHAR *LinkTarget = (TCHAR *) Tcl_FSGetNativePath(toPtr);
  	TCHAR *LinkSource = (TCHAR *) Tcl_FSGetNativePath(pathPtr);
  
  	if (LinkSource == NULL || LinkTarget == NULL) {
***************
*** 3256,3267 ****
--- 3254,3271 ----
  	 */
  
  	validPathPtr = Tcl_FSGetTranslatedPath(NULL, pathPtr);
+ 	if (validPathPtr == NULL) {
+ 	    return NULL;
+ 	}
      } else {
  	/*
  	 * Make sure the normalized path is set.
  	 */
  
  	validPathPtr = Tcl_FSGetNormalizedPath(NULL, pathPtr);
+ 	if (validPathPtr == NULL) {
+ 	    return NULL;
+ 	}
  	Tcl_IncrRefCount(validPathPtr);
      }
  
