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
97b83a6d
Commit
97b83a6d
authored
Sep 06, 2022
by
Robert Wilhelm
Committed by
Alexandre Julliard
Sep 06, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
scrrun: Store full path in folder object.
parent
4e360e8d
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
3 deletions
+19
-3
filesystem.c
dlls/scrrun/filesystem.c
+18
-2
filesystem.c
dlls/scrrun/tests/filesystem.c
+1
-1
No files found.
dlls/scrrun/filesystem.c
View file @
97b83a6d
...
...
@@ -2699,6 +2699,7 @@ static const IFolderVtbl foldervtbl = {
HRESULT
create_folder
(
const
WCHAR
*
path
,
IFolder
**
folder
)
{
struct
folder
*
object
;
DWORD
len
;
*
folder
=
NULL
;
...
...
@@ -2709,13 +2710,28 @@ HRESULT create_folder(const WCHAR *path, IFolder **folder)
object
->
IFolder_iface
.
lpVtbl
=
&
foldervtbl
;
object
->
ref
=
1
;
object
->
path
=
SysAllocString
(
path
);
if
(
!
object
->
path
)
len
=
GetFullPathNameW
(
path
,
0
,
NULL
,
NULL
);
if
(
!
len
)
{
free
(
object
);
return
E_FAIL
;
}
object
->
path
=
SysAllocStringLen
(
NULL
,
len
);
if
(
!
object
->
path
)
{
free
(
object
);
return
E_OUTOFMEMORY
;
}
if
(
!
GetFullPathNameW
(
path
,
len
,
object
->
path
,
NULL
))
{
SysFreeString
(
object
->
path
);
free
(
object
);
return
E_FAIL
;
}
init_classinfo
(
&
CLSID_Folder
,
(
IUnknown
*
)
&
object
->
IFolder_iface
,
&
object
->
classinfo
);
*
folder
=
&
object
->
IFolder_iface
;
...
...
dlls/scrrun/tests/filesystem.c
View file @
97b83a6d
...
...
@@ -973,7 +973,7 @@ static void test_GetFolder(void)
SysFreeString
(
str
);
hr
=
IFolder_get_Path
(
folder
,
&
str
);
ok
(
hr
==
S_OK
,
"Unexpected hr %#lx.
\n
"
,
hr
);
todo_wine
ok
(
!
PathIsRelativeW
(
str
),
"path %s is relative.
\n
"
,
wine_dbgstr_w
(
str
));
ok
(
!
PathIsRelativeW
(
str
),
"path %s is relative.
\n
"
,
wine_dbgstr_w
(
str
));
SysFreeString
(
str
);
IFolder_Release
(
folder
);
RemoveDirectoryW
(
dir
);
...
...
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