Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
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-winehq
Commits
dd26d1f9
Commit
dd26d1f9
authored
Jun 12, 2015
by
Jacek Caban
Committed by
Alexandre Julliard
Jun 15, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
scrrun: Added IFile::put_Attributes imeplementation.
parent
3b8a8d31
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
28 additions
and
6 deletions
+28
-6
filesystem.c
dlls/scrrun/filesystem.c
+4
-2
filesystem.c
dlls/scrrun/tests/filesystem.c
+24
-4
No files found.
dlls/scrrun/filesystem.c
View file @
dd26d1f9
...
...
@@ -2645,8 +2645,10 @@ static HRESULT WINAPI file_get_Attributes(IFile *iface, FileAttribute *pfa)
static
HRESULT
WINAPI
file_put_Attributes
(
IFile
*
iface
,
FileAttribute
pfa
)
{
struct
file
*
This
=
impl_from_IFile
(
iface
);
FIXME
(
"(%p)->(%x)
\n
"
,
This
,
pfa
);
return
E_NOTIMPL
;
TRACE
(
"(%p)->(%x)
\n
"
,
This
,
pfa
);
return
SetFileAttributesW
(
This
->
path
,
pfa
)
?
S_OK
:
create_error
(
GetLastError
());
}
static
HRESULT
WINAPI
file_get_DateCreated
(
IFile
*
iface
,
DATE
*
pdate
)
...
...
dlls/scrrun/tests/filesystem.c
View file @
dd26d1f9
...
...
@@ -542,7 +542,7 @@ static void test_GetFile(void)
WCHAR
pathW
[
MAX_PATH
];
FileAttribute
fa
;
VARIANT
size
;
DWORD
gfa
;
DWORD
gfa
,
new_gfa
;
IFile
*
file
;
HRESULT
hr
;
HANDLE
hf
;
...
...
@@ -580,10 +580,30 @@ static void test_GetFile(void)
ok
(
!
lstrcmpW
(
str
,
pathW
),
"got %s
\n
"
,
wine_dbgstr_w
(
str
));
SysFreeString
(
str
);
#define FILE_ATTR_MASK (FILE_ATTRIBUTE_READONLY | FILE_ATTRIBUTE_HIDDEN | \
FILE_ATTRIBUTE_SYSTEM | FILE_ATTRIBUTE_DIRECTORY | FILE_ATTRIBUTE_ARCHIVE | \
FILE_ATTRIBUTE_REPARSE_POINT | FILE_ATTRIBUTE_COMPRESSED)
hr
=
IFile_get_Attributes
(
file
,
&
fa
);
gfa
=
GetFileAttributesW
(
pathW
)
&
FILE_ATTR_MASK
;
ok
(
hr
==
S_OK
,
"get_Attributes returned %x, expected S_OK
\n
"
,
hr
);
ok
(
fa
==
gfa
,
"fa = %x, expected %x
\n
"
,
fa
,
gfa
);
hr
=
IFile_put_Attributes
(
file
,
gfa
|
FILE_ATTRIBUTE_READONLY
);
ok
(
hr
==
S_OK
,
"put_Attributes failed: %08x
\n
"
,
hr
);
new_gfa
=
GetFileAttributesW
(
pathW
)
&
FILE_ATTR_MASK
;
ok
(
new_gfa
==
(
gfa
|
FILE_ATTRIBUTE_READONLY
),
"new_gfa = %x, expected %x
\n
"
,
new_gfa
,
gfa
|
FILE_ATTRIBUTE_READONLY
);
hr
=
IFile_get_Attributes
(
file
,
&
fa
);
ok
(
hr
==
S_OK
,
"get_Attributes returned %x, expected S_OK
\n
"
,
hr
);
ok
(
fa
==
new_gfa
,
"fa = %x, expected %x
\n
"
,
fa
,
new_gfa
);
hr
=
IFile_put_Attributes
(
file
,
gfa
);
ok
(
hr
==
S_OK
,
"put_Attributes failed: %08x
\n
"
,
hr
);
new_gfa
=
GetFileAttributesW
(
pathW
)
&
FILE_ATTR_MASK
;
ok
(
new_gfa
==
gfa
,
"new_gfa = %x, expected %x
\n
"
,
new_gfa
,
gfa
);
hr
=
IFile_get_Attributes
(
file
,
&
fa
);
gfa
=
GetFileAttributesW
(
pathW
)
&
(
FILE_ATTRIBUTE_READONLY
|
FILE_ATTRIBUTE_HIDDEN
|
FILE_ATTRIBUTE_SYSTEM
|
FILE_ATTRIBUTE_DIRECTORY
|
FILE_ATTRIBUTE_ARCHIVE
|
FILE_ATTRIBUTE_REPARSE_POINT
|
FILE_ATTRIBUTE_COMPRESSED
);
ok
(
hr
==
S_OK
,
"get_Attributes returned %x, expected S_OK
\n
"
,
hr
);
ok
(
fa
==
gfa
,
"fa = %x, expected %x
\n
"
,
fa
,
gfa
);
...
...
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