From bd7da088b2cf9cfe6004606fb57fd65ad275fe50 Mon Sep 17 00:00:00 2001 From: vincentdarley Date: Mon, 22 Oct 2001 17:10:00 +0000 Subject: small win fix --- ChangeLog | 5 +++++ win/tclWinFCmd.c | 16 +++++++++++++++- 2 files changed, 20 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index dfca7f3..9e91873 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2001-10-22 Vince Darley + + * win/tclWinFCmd.c: fix to stop test suite from hanging process + under some versions of WinNT. [Bug #466102] (Kevin Kenny) + 2001-10-18 Jeff Hobbs * tests/clock.test (clock-8.1): diff --git a/win/tclWinFCmd.c b/win/tclWinFCmd.c index 0611ca8..744ab2b 100644 --- a/win/tclWinFCmd.c +++ b/win/tclWinFCmd.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: tclWinFCmd.c,v 1.14 2001/09/28 11:10:56 vincentdarley Exp $ + * RCS: @(#) $Id: tclWinFCmd.c,v 1.15 2001/10/22 17:10:00 vincentdarley Exp $ */ #include "tclWinInt.h" @@ -447,6 +447,20 @@ DoCopyFile( return TCL_ERROR; } + /* + * Similarly, if 'nativeSrc' is NULL or empty, the following code + * locks up the process on WinNT; bail out. + */ + + if (nativeSrc == NULL || nativeSrc[0] == '\0') { + Tcl_SetErrno(ENOENT); + return TCL_ERROR; + } + + /* + * OK, now try the copy. + */ + __try { if ((*tclWinProcs->copyFileProc)(nativeSrc, nativeDst, 0) != FALSE) { return TCL_OK; -- cgit v0.12