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. git-svn-id: svn://10.0.0.236/trunk@169115 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
parent
8dcd375395
commit
c4d21e1ef5
@ -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