summaryrefslogtreecommitdiffstats
path: root/unix
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2014-11-03 12:54:25 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2014-11-03 12:54:25 (GMT)
commitb14c2f49d2635f8c5b7f5f7e96aafd8a54fabcf2 (patch)
tree108eb7029d3260cbad294cd97c09a6c18b50cf39 /unix
parentde82a1a99e24ed4e3f1ec491abafbc478e57a908 (diff)
parent48ab03f3cd8e637c9cdd52bdbb93737f07d2bb60 (diff)
downloadtcl-b14c2f49d2635f8c5b7f5f7e96aafd8a54fabcf2.zip
tcl-b14c2f49d2635f8c5b7f5f7e96aafd8a54fabcf2.tar.gz
tcl-b14c2f49d2635f8c5b7f5f7e96aafd8a54fabcf2.tar.bz2
Add test-case for previous commit, which shows that when trying to open a filename with invalid characters gives the right error-message. (same bug existed on UNIX too, which is now fixed)
Diffstat (limited to 'unix')
-rw-r--r--unix/tclUnixChan.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/unix/tclUnixChan.c b/unix/tclUnixChan.c
index fdc9d1d..2eca714 100644
--- a/unix/tclUnixChan.c
+++ b/unix/tclUnixChan.c
@@ -1361,6 +1361,11 @@ TclpOpenFileChannel(
native = Tcl_FSGetNativePath(pathPtr);
if (native == NULL) {
+ if (interp != (Tcl_Interp *) NULL) {
+ Tcl_AppendResult(interp, "couldn't open \"",
+ TclGetString(pathPtr), "\": filename is invalid on this platform",
+ NULL);
+ }
return NULL;
}