diff options
author | vincentdarley <vincentdarley> | 2006-03-19 22:47:28 (GMT) |
---|---|---|
committer | vincentdarley <vincentdarley> | 2006-03-19 22:47:28 (GMT) |
commit | 65445fd58393fa26379df62078124e7ca893bb75 (patch) | |
tree | c4a57331f774fdba513a729f09ae6776ac109c00 /win/tclWinFile.c | |
parent | 72206dd82f0adc6ea37e52500b0be03bb3b830fb (diff) | |
download | tcl-65445fd58393fa26379df62078124e7ca893bb75.zip tcl-65445fd58393fa26379df62078124e7ca893bb75.tar.gz tcl-65445fd58393fa26379df62078124e7ca893bb75.tar.bz2 |
backport of file writable fixes
Diffstat (limited to 'win/tclWinFile.c')
-rw-r--r-- | win/tclWinFile.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/win/tclWinFile.c b/win/tclWinFile.c index f4d882b..507c2a1 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.44.2.14 2006/03/10 10:35:25 vincentdarley Exp $ + * RCS: @(#) $Id: tclWinFile.c,v 1.44.2.15 2006/03/19 22:47:30 vincentdarley Exp $ */ //#define _WIN32_WINNT 0x0500 @@ -1342,8 +1342,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 @@ -1520,6 +1519,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; @@ -2611,7 +2611,6 @@ TclpObjNormalizePath(interp, pathPtr, nextCheckpoint) return nextCheckpoint; } - /* *--------------------------------------------------------------------------- * |