summaryrefslogtreecommitdiffstats
path: root/win/tclWinFile.c
diff options
context:
space:
mode:
authorvincentdarley <vincentdarley>2006-03-14 19:34:25 (GMT)
committervincentdarley <vincentdarley>2006-03-14 19:34:25 (GMT)
commit54b14791b5842fe7e3c0ad6a77e2e6bd10237627 (patch)
tree174d43369770a1c8db6a61a7f76f4fe572109cfd /win/tclWinFile.c
parent02d304b56fb79258a992e9f47e325445f2e75d40 (diff)
downloadtcl-54b14791b5842fe7e3c0ad6a77e2e6bd10237627.zip
tcl-54b14791b5842fe7e3c0ad6a77e2e6bd10237627.tar.gz
tcl-54b14791b5842fe7e3c0ad6a77e2e6bd10237627.tar.bz2
90% fix of file writable issues on Windows
Diffstat (limited to 'win/tclWinFile.c')
-rw-r--r--win/tclWinFile.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/win/tclWinFile.c b/win/tclWinFile.c
index 4a13d39..196c7ac 100644
--- a/win/tclWinFile.c
+++ b/win/tclWinFile.c
@@ -11,7 +11,7 @@
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclWinFile.c,v 1.84 2006/03/10 10:33:55 vincentdarley Exp $
+ * RCS: @(#) $Id: tclWinFile.c,v 1.85 2006/03/14 19:34:30 vincentdarley Exp $
*/
/* #define _WIN32_WINNT 0x0500 */
@@ -1547,8 +1547,7 @@ NativeAccess(
}
if ((mode & W_OK)
- && !(attr & FILE_ATTRIBUTE_DIRECTORY)
- /* && (tclWinProcs->getFileSecurityProc == NULL) */
+ && (tclWinProcs->getFileSecurityProc == NULL)
&& (attr & FILE_ATTRIBUTE_READONLY)) {
/*
* We don't have the advanced 'getFileSecurityProc', and
@@ -1725,6 +1724,7 @@ NativeAccess(
* we must still check the 'attr' value.
*/
if ((mode & W_OK)
+ && !(attr & FILE_ATTRIBUTE_DIRECTORY)
&& (attr & FILE_ATTRIBUTE_READONLY)) {
Tcl_SetErrno(EACCES);
return -1;