summaryrefslogtreecommitdiffstats
path: root/win/tclWinFCmd.c
diff options
context:
space:
mode:
authorredman <redman>1999-04-21 20:08:17 (GMT)
committerredman <redman>1999-04-21 20:08:17 (GMT)
commitd2a3e887caf524096070bbe8667b700520357b4b (patch)
treeb034b66986b8c1e3a7b065bf1ac1a4fd83bc8686 /win/tclWinFCmd.c
parent7ab2eee54bc6371397693ad5a6610e8d5efc4cc8 (diff)
downloadtcl-d2a3e887caf524096070bbe8667b700520357b4b.zip
tcl-d2a3e887caf524096070bbe8667b700520357b4b.tar.gz
tcl-d2a3e887caf524096070bbe8667b700520357b4b.tar.bz2
Merge with 8.1.0 branch
Diffstat (limited to 'win/tclWinFCmd.c')
-rw-r--r--win/tclWinFCmd.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/win/tclWinFCmd.c b/win/tclWinFCmd.c
index 81f4608..d7d990e 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.3 1999/04/16 00:48:08 stanton Exp $
+ * RCS: @(#) $Id: tclWinFCmd.c,v 1.4 1999/04/21 20:09:17 redman Exp $
*/
#include "tclWinInt.h"
@@ -1354,6 +1354,15 @@ ConvertFileNameFormat(
Tcl_SplitPath(fileName, &pathc, &pathv);
newv = (char **) ckalloc(pathc * sizeof(char *));
+ if (pathc == 0) {
+ Tcl_AppendStringsToObj(Tcl_GetObjResult(interp),
+ "could not read \"", fileName,
+ "\": no such file or directory",
+ (char *) NULL);
+ result = TCL_ERROR;
+ goto cleanup;
+ }
+
for (i = 0; i < pathc; i++) {
if ((pathv[i][0] == '/')
|| ((strlen(pathv[i]) == 3) && (pathv[i][1] == ':'))