Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-cw
Commits
e3b59eac
Commit
e3b59eac
authored
Mar 16, 2005
by
Ulrich Czekalla
Committed by
Alexandre Julliard
Mar 16, 2005
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Don't mark a file as readonly if it has any write bit set.
parent
38972345
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
4 deletions
+6
-4
directory.c
dlls/ntdll/directory.c
+1
-1
file.c
dlls/ntdll/file.c
+5
-3
No files found.
dlls/ntdll/directory.c
View file @
e3b59eac
...
...
@@ -628,7 +628,7 @@ static FILE_BOTH_DIR_INFORMATION *append_entry( void *info_ptr, ULONG *pos, ULON
info
->
FileAttributes
=
FILE_ATTRIBUTE_ARCHIVE
;
}
if
(
!
(
st
.
st_mode
&
S_IWUSR
))
if
(
!
(
st
.
st_mode
&
(
S_IWUSR
|
S_IWGRP
|
S_IWOTH
)
))
info
->
FileAttributes
|=
FILE_ATTRIBUTE_READONLY
;
if
(
!
show_dot_files
&&
long_name
[
0
]
==
'.'
&&
long_name
[
1
]
&&
(
long_name
[
1
]
!=
'.'
||
long_name
[
2
]))
...
...
dlls/ntdll/file.c
View file @
e3b59eac
...
...
@@ -966,7 +966,8 @@ NTSTATUS WINAPI NtQueryInformationFile( HANDLE hFile, PIO_STATUS_BLOCK io,
{
if
(
S_ISDIR
(
st
.
st_mode
))
info
->
FileAttributes
=
FILE_ATTRIBUTE_DIRECTORY
;
else
info
->
FileAttributes
=
FILE_ATTRIBUTE_ARCHIVE
;
if
(
!
(
st
.
st_mode
&
S_IWUSR
))
info
->
FileAttributes
|=
FILE_ATTRIBUTE_READONLY
;
if
(
!
(
st
.
st_mode
&
(
S_IWUSR
|
S_IWGRP
|
S_IWOTH
)))
info
->
FileAttributes
|=
FILE_ATTRIBUTE_READONLY
;
RtlSecondsSince1970ToTime
(
st
.
st_mtime
,
&
info
->
CreationTime
);
RtlSecondsSince1970ToTime
(
st
.
st_mtime
,
&
info
->
LastWriteTime
);
RtlSecondsSince1970ToTime
(
st
.
st_ctime
,
&
info
->
ChangeTime
);
...
...
@@ -1053,7 +1054,7 @@ NTSTATUS WINAPI NtQueryInformationFile( HANDLE hFile, PIO_STATUS_BLOCK io,
info
->
StandardInformation
.
NumberOfLinks
=
st
.
st_nlink
;
info
->
StandardInformation
.
DeletePending
=
FALSE
;
/* FIXME */
}
if
(
!
(
st
.
st_mode
&
S_IWUSR
))
if
(
!
(
st
.
st_mode
&
(
S_IWUSR
|
S_IWGRP
|
S_IWOTH
)
))
info
->
BasicInformation
.
FileAttributes
|=
FILE_ATTRIBUTE_READONLY
;
RtlSecondsSince1970ToTime
(
st
.
st_mtime
,
&
info
->
BasicInformation
.
CreationTime
);
RtlSecondsSince1970ToTime
(
st
.
st_mtime
,
&
info
->
BasicInformation
.
LastWriteTime
);
...
...
@@ -1249,7 +1250,8 @@ NTSTATUS WINAPI NtQueryFullAttributesFile( const OBJECT_ATTRIBUTES *attr,
info
->
AllocationSize
.
QuadPart
=
(
ULONGLONG
)
st
.
st_blocks
*
512
;
info
->
EndOfFile
.
QuadPart
=
st
.
st_size
;
}
if
(
!
(
st
.
st_mode
&
S_IWUSR
))
info
->
FileAttributes
|=
FILE_ATTRIBUTE_READONLY
;
if
(
!
(
st
.
st_mode
&
(
S_IWUSR
|
S_IWGRP
|
S_IWOTH
)))
info
->
FileAttributes
|=
FILE_ATTRIBUTE_READONLY
;
RtlSecondsSince1970ToTime
(
st
.
st_mtime
,
&
info
->
CreationTime
);
RtlSecondsSince1970ToTime
(
st
.
st_mtime
,
&
info
->
LastWriteTime
);
RtlSecondsSince1970ToTime
(
st
.
st_ctime
,
&
info
->
ChangeTime
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment