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
3257bcd4
Commit
3257bcd4
authored
Jun 17, 2005
by
Aric Stewart
Committed by
Alexandre Julliard
Jun 17, 2005
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
A long overdue fix to MSI_SetTargetPath. This should fix an error with
some installers that where unable to change the target path.
parent
e9db87b9
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
1 deletion
+18
-1
install.c
dlls/msi/install.c
+18
-1
No files found.
dlls/msi/install.c
View file @
3257bcd4
...
...
@@ -255,10 +255,16 @@ UINT WINAPI MsiSetTargetPathA(MSIHANDLE hInstall, LPCSTR szFolder,
return
rc
;
}
/*
* Ok my original interpretation of this was wrong. And it looks like msdn has
* changed a bit also. The given folder path does not have to actually already
* exist, it just cannot be read only and must be a legal folder path.
*/
UINT
MSI_SetTargetPathW
(
MSIPACKAGE
*
package
,
LPCWSTR
szFolder
,
LPCWSTR
szFolderPath
)
{
DWORD
i
;
DWORD
attrib
;
LPWSTR
path
=
NULL
;
LPWSTR
path2
=
NULL
;
MSIFOLDER
*
folder
;
...
...
@@ -271,7 +277,11 @@ UINT MSI_SetTargetPathW(MSIPACKAGE *package, LPCWSTR szFolder,
if
(
szFolderPath
[
0
]
==
0
)
return
ERROR_FUNCTION_FAILED
;
if
(
GetFileAttributesW
(
szFolderPath
)
==
INVALID_FILE_ATTRIBUTES
)
attrib
=
GetFileAttributesW
(
szFolderPath
);
if
(
attrib
!=
INVALID_FILE_ATTRIBUTES
&&
(
!
(
attrib
&
FILE_ATTRIBUTE_DIRECTORY
)
||
attrib
&
FILE_ATTRIBUTE_OFFLINE
||
attrib
&
FILE_ATTRIBUTE_READONLY
))
return
ERROR_FUNCTION_FAILED
;
path
=
resolve_folder
(
package
,
szFolder
,
FALSE
,
FALSE
,
&
folder
);
...
...
@@ -279,6 +289,13 @@ UINT MSI_SetTargetPathW(MSIPACKAGE *package, LPCWSTR szFolder,
if
(
!
path
)
return
ERROR_INVALID_PARAMETER
;
if
(
attrib
==
INVALID_FILE_ATTRIBUTES
)
{
if
(
!
CreateDirectoryW
(
szFolderPath
,
NULL
))
return
ERROR_FUNCTION_FAILED
;
RemoveDirectoryW
(
szFolderPath
);
}
HeapFree
(
GetProcessHeap
(),
0
,
folder
->
Property
);
folder
->
Property
=
build_directory_name
(
2
,
szFolderPath
,
NULL
);
...
...
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