summaryrefslogtreecommitdiffstats
path: root/generic/tclFCmd.c
diff options
context:
space:
mode:
authorvincentdarley <vincentdarley@noemail.net>2005-06-13 08:31:58 (GMT)
committervincentdarley <vincentdarley@noemail.net>2005-06-13 08:31:58 (GMT)
commit88cfcecc55e02bd8fde9ca614a83d79970e0156d (patch)
tree75435968c0a3a4a9d1b571095585659b11daa2a9 /generic/tclFCmd.c
parent6d3fac8ffed06fb065b63cd3abef969e170343cd (diff)
downloadtcl-88cfcecc55e02bd8fde9ca614a83d79970e0156d.zip
tcl-88cfcecc55e02bd8fde9ca614a83d79970e0156d.tar.gz
tcl-88cfcecc55e02bd8fde9ca614a83d79970e0156d.tar.bz2
correct fix to file mkdir
FossilOrigin-Name: 9c6c2985d7adad6c2a36c877e5f6fce5ac55a3f9
Diffstat (limited to 'generic/tclFCmd.c')
-rw-r--r--generic/tclFCmd.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/generic/tclFCmd.c b/generic/tclFCmd.c
index 9ee530b..d5e7005 100644
--- a/generic/tclFCmd.c
+++ b/generic/tclFCmd.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: tclFCmd.c,v 1.33 2005/06/09 16:24:47 vincentdarley Exp $
+ * RCS: @(#) $Id: tclFCmd.c,v 1.34 2005/06/13 08:32:05 vincentdarley Exp $
*/
#include "tclInt.h"
@@ -262,11 +262,14 @@ TclFileMakeDirsCmd(interp, objc, objv)
goto done;
}
} else if (errno != ENOENT) {
+ /*
+ * If Tcl_FSStat() failed and the error is anything
+ * other than non-existence of the target, throw the
+ * error.
+ */
errfile = target;
goto done;
- }
-
- if (Tcl_FSCreateDirectory(target) != TCL_OK) {
+ } else if (Tcl_FSCreateDirectory(target) != TCL_OK) {
/*
* Create might have failed because of being in a race
* condition with another process trying to create the