Bugzilla Bug 271883: remove FILE_HIDDEN from _PR_MD_OPEN. _PR_MD_OPEN

now completely ignores its mode argument, like it does on Windows.  The
patch is contributed by Peter Weilbacher <mozilla@Weilbacher.org>.
r=mkaply,wtc.
This commit is contained in:
wtchang%redhat.com 2005-02-11 18:34:42 +00:00
parent 06bc81b501
commit 4537e6ccd6

View File

@ -151,8 +151,6 @@ _PR_MD_OPEN(const char *name, PRIntn osflags, int mode)
APIRET rc = 0;
PRUword actionTaken;
ULONG fattr;
if (osflags & PR_SYNC) access |= OPEN_FLAGS_WRITE_THROUGH;
if (osflags & PR_RDONLY)
@ -181,16 +179,12 @@ _PR_MD_OPEN(const char *name, PRIntn osflags, int mode)
flags = OPEN_ACTION_FAIL_IF_NEW | OPEN_ACTION_OPEN_IF_EXISTS;
}
if (isxdigit(mode) == 0) /* file attribs are hex, UNIX modes octal */
fattr = ((ULONG)mode == FILE_HIDDEN) ? FILE_HIDDEN : FILE_NORMAL;
else fattr = FILE_NORMAL;
do {
rc = DosOpen((char*)name,
&file, /* file handle if successful */
&actionTaken, /* reason for failure */
0, /* initial size of new file */
fattr, /* file system attributes */
FILE_NORMAL, /* file system attributes */
flags, /* Open flags */
access, /* Open mode and rights */
0); /* OS/2 Extended Attributes */