mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-24 03:19:06 +00:00
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:
parent
06bc81b501
commit
4537e6ccd6
@ -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 */
|
||||
|
Loading…
x
Reference in New Issue
Block a user