summaryrefslogtreecommitdiffstats
path: root/generic/tclFCmd.c
diff options
context:
space:
mode:
authorvincentdarley <vincentdarley>2002-07-18 16:17:43 (GMT)
committervincentdarley <vincentdarley>2002-07-18 16:17:43 (GMT)
commit20201e313950ca2b4b8af678b6527c4c14c8f7c5 (patch)
tree1b38c2e75ef177ad7d9cb8ee07a48254d5f218eb /generic/tclFCmd.c
parentac016ab108f10eb41a68b7d6b086143b2f8241b0 (diff)
downloadtcl-20201e313950ca2b4b8af678b6527c4c14c8f7c5.zip
tcl-20201e313950ca2b4b8af678b6527c4c14c8f7c5.tar.gz
tcl-20201e313950ca2b4b8af678b6527c4c14c8f7c5.tar.bz2
fix to knownBug test
Diffstat (limited to 'generic/tclFCmd.c')
-rw-r--r--generic/tclFCmd.c14
1 files changed, 13 insertions, 1 deletions
diff --git a/generic/tclFCmd.c b/generic/tclFCmd.c
index cc920ce..e027977 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.17 2002/03/24 11:41:50 vincentdarley Exp $
+ * RCS: @(#) $Id: tclFCmd.c,v 1.18 2002/07/18 16:17:48 vincentdarley Exp $
*/
#include "tclInt.h"
@@ -828,11 +828,23 @@ TclFileAttrsCmd(interp, objc, objv)
objc -= 3;
objv += 3;
result = TCL_ERROR;
+ Tcl_SetErrno(0);
attributeStrings = Tcl_FSFileAttrStrings(filePtr, &objStrings);
if (attributeStrings == NULL) {
int index;
Tcl_Obj *objPtr;
if (objStrings == NULL) {
+ if (Tcl_GetErrno() != 0) {
+ /*
+ * There was an error, probably that the filePtr is
+ * not accepted by any filesystem
+ */
+ Tcl_AppendStringsToObj(Tcl_GetObjResult(interp),
+ "could not read \"", Tcl_GetString(filePtr),
+ "\": ", Tcl_PosixError(interp),
+ (char *) NULL);
+ return TCL_ERROR;
+ }
goto end;
}
/* We own the object now */