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
ad609f15
Commit
ad609f15
authored
Sep 25, 2006
by
James Hawkins
Committed by
Alexandre Julliard
Sep 26, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msi: Only specifically resolve the TARGETDIR directory once.
parent
3ee3fc35
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
22 deletions
+13
-22
helpers.c
dlls/msi/helpers.c
+10
-10
package.c
dlls/msi/tests/package.c
+3
-12
No files found.
dlls/msi/helpers.c
View file @
ad609f15
...
...
@@ -216,10 +216,14 @@ LPWSTR resolve_folder(MSIPACKAGE *package, LPCWSTR name, BOOL source,
if
(
!
name
)
return
NULL
;
f
=
get_loaded_folder
(
package
,
name
);
if
(
!
f
)
return
NULL
;
/* special resolving for Target and Source root dir */
if
(
strcmpW
(
name
,
cszTargetDir
)
==
0
||
strcmpW
(
name
,
cszSourceDir
)
==
0
)
{
if
(
!
source
)
if
(
!
f
->
ResolvedTarget
&&
!
f
->
Property
)
{
LPWSTR
check_path
;
check_path
=
msi_dup_property
(
package
,
cszTargetDir
);
...
...
@@ -236,17 +240,13 @@ LPWSTR resolve_folder(MSIPACKAGE *package, LPCWSTR name, BOOL source,
if
(
strcmpiW
(
path
,
check_path
)
!=
0
)
MSI_SetPropertyW
(
package
,
cszTargetDir
,
path
);
msi_free
(
check_path
);
f
->
ResolvedTarget
=
path
;
}
else
path
=
get_source_root
(
package
);
if
(
folder
)
*
folder
=
get_loaded_folder
(
package
,
name
);
return
path
;
}
f
=
get_loaded_folder
(
package
,
name
);
if
(
!
f
)
return
NULL
;
if
(
!
f
->
ResolvedSource
)
f
->
ResolvedSource
=
get_source_root
(
package
);
}
if
(
folder
)
*
folder
=
f
;
...
...
dlls/msi/tests/package.c
View file @
ad609f15
...
...
@@ -454,10 +454,7 @@ static void test_getsourcepath( void )
sz
=
sizeof
buffer
-
1
;
strcpy
(
buffer
,
"x bad"
);
r
=
MsiGetSourcePath
(
hpkg
,
"TARGETDIR"
,
buffer
,
&
sz
);
todo_wine
{
ok
(
r
==
ERROR_DIRECTORY
,
"return value wrong
\n
"
);
}
ok
(
r
==
ERROR_DIRECTORY
,
"return value wrong
\n
"
);
r
=
MsiDoAction
(
hpkg
,
"CostInitialize"
);
ok
(
r
==
ERROR_SUCCESS
,
"cost init failed
\n
"
);
...
...
@@ -675,17 +672,11 @@ static void test_settargetpath(void)
lstrcat
(
tempdir
,
"
\\
"
);
r
=
MsiGetTargetPath
(
hpkg
,
"TARGETDIR"
,
buffer
,
&
sz
);
ok
(
r
==
ERROR_SUCCESS
,
"failed to get target path: %d
\n
"
,
r
);
todo_wine
{
ok
(
!
lstrcmp
(
buffer
,
tempdir
),
"Expected %s, got %s
\n
"
,
tempdir
,
buffer
);
}
ok
(
!
lstrcmp
(
buffer
,
tempdir
),
"Expected %s, got %s
\n
"
,
tempdir
,
buffer
);
sprintf
(
file
,
"%srootfile.txt"
,
tempdir
);
query_file_path
(
hpkg
,
"[#RootFile]"
,
buffer
);
todo_wine
{
ok
(
!
lstrcmp
(
buffer
,
file
),
"Expected %s, got %s
\n
"
,
file
,
buffer
);
}
ok
(
!
lstrcmp
(
buffer
,
file
),
"Expected %s, got %s
\n
"
,
file
,
buffer
);
r
=
MsiSetTargetPath
(
hpkg
,
"TestParent"
,
"C:
\\
one
\\
two"
);
ok
(
r
==
ERROR_SUCCESS
,
"MsiSetTargetPath returned %d
\n
"
,
r
);
...
...
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