src/ChangeLog addition:
2006-12-25 Benson I. Margulies <benson(a)dchbk.us>
* src/fileio.c (check_writable):
Cope with the fact that the read-only attribute trumps Windows NTFS
ACLS.
XEmacs21-4 source patch:
Diff command: cvs -q diff -u
Files affected: src/fileio.c
===================================================================
RCS
cvs server: nt/xemacs.sln is a new entry, no comparison available
cvs server: nt/xemacs.vcproj is a new entry, no comparison available
Index: src/fileio.c
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/src/fileio.c,v
retrieving revision 1.66.2.8
diff -u -r1.66.2.8 fileio.c
--- src/fileio.c 2006/11/20 18:20:22 1.66.2.8
+++ src/fileio.c 2006/12/25 14:21:36
@@ -2307,13 +2307,18 @@
filename = filename_buffer;
#endif
+ // ask simple question first
+ attributes = GetFileAttributes(filename);
+ if (0 != (attributes & FILE_ATTRIBUTE_READONLY))
+ return 0;
+
+
/* Win32 prototype lacks const. */
error = GetNamedSecurityInfo((LPTSTR)filename, SE_FILE_OBJECT,
DACL_SECURITY_INFORMATION|GROUP_SECURITY_INFORMATION|OWNER_SECURITY_INFORMATION,
&psidOwner, &psidGroup, &pDacl, &pSacl,
&pDesc);
if (error != ERROR_SUCCESS) { // FAT?
- attributes = GetFileAttributes(filename);
- return (attributes & FILE_ATTRIBUTE_DIRECTORY) || (0 == (attributes &
FILE_ATTRIBUTE_READONLY));
+ return 1;
}
genericMapping.GenericRead = FILE_GENERIC_READ;
_______________________________________________
XEmacs-Patches mailing list
XEmacs-Patches(a)xemacs.org
http://calypso.tux.org/cgi-bin/mailman/listinfo/xemacs-patches