diff options
| author | vincentdarley <vincentdarley> | 2001-10-22 17:10:00 (GMT) |
|---|---|---|
| committer | vincentdarley <vincentdarley> | 2001-10-22 17:10:00 (GMT) |
| commit | 14a515e9b0cc2e0ff4e5e5ec8aba693fd9c79ba6 (patch) | |
| tree | 9e94361a600e531a3580fd7b0869a6aaa5b9cb40 /win/tclWinFCmd.c | |
| parent | 7dc485c42acd7d5c65635028ad318fade8e5d747 (diff) | |
| download | tcl-14a515e9b0cc2e0ff4e5e5ec8aba693fd9c79ba6.zip tcl-14a515e9b0cc2e0ff4e5e5ec8aba693fd9c79ba6.tar.gz tcl-14a515e9b0cc2e0ff4e5e5ec8aba693fd9c79ba6.tar.bz2 | |
small win fix
Diffstat (limited to 'win/tclWinFCmd.c')
| -rw-r--r-- | win/tclWinFCmd.c | 16 |
1 files changed, 15 insertions, 1 deletions
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; |
