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
a27ae792
Commit
a27ae792
authored
Nov 01, 2006
by
James Hawkins
Committed by
Alexandre Julliard
Nov 02, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
advpack: Use the full path of the INF file as the source directory if the CAB file is invalid.
parent
313d93e4
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
8 deletions
+11
-8
install.c
dlls/advpack/install.c
+10
-6
install.c
dlls/advpack/tests/install.c
+1
-2
No files found.
dlls/advpack/install.c
View file @
a27ae792
...
...
@@ -833,7 +833,7 @@ HRESULT WINAPI LaunchINFSectionExW(HWND hWnd, HINSTANCE hInst, LPWSTR cmdline, I
LPWSTR
cmdline_copy
,
cmdline_ptr
;
LPWSTR
flags
,
ptr
;
CABINFOW
cabinfo
;
HRESULT
hr
=
S_OK
;
HRESULT
hr
;
TRACE
(
"(%p, %p, %s, %d)
\n
"
,
hWnd
,
hInst
,
debugstr_w
(
cmdline
),
show
);
...
...
@@ -853,22 +853,26 @@ HRESULT WINAPI LaunchINFSectionExW(HWND hWnd, HINSTANCE hInst, LPWSTR cmdline, I
if
(
flags
)
cabinfo
.
dwFlags
=
atolW
(
flags
);
if
(
!
is_full_path
(
cabinfo
.
pszCab
)
&&
!
is_full_path
(
cabinfo
.
pszInf
))
{
HeapFree
(
GetProcessHeap
(),
0
,
cmdline_copy
);
return
E_INVALIDARG
;
}
/* get the source path from the cab filename */
if
(
cabinfo
.
pszCab
&&
*
cabinfo
.
pszCab
)
{
if
(
!
is_full_path
(
cabinfo
.
pszCab
))
goto
done
;
lstrcpyW
(
cabinfo
.
szSrcPath
,
cabinfo
.
pszInf
);
else
lstrcpyW
(
cabinfo
.
szSrcPath
,
cabinfo
.
pszCab
);
lstrcpyW
(
cabinfo
.
szSrcPath
,
cabinfo
.
pszCab
);
ptr
=
strrchrW
(
cabinfo
.
szSrcPath
,
'\\'
);
*
(
++
ptr
)
=
'\0'
;
}
hr
=
ExecuteCabW
(
hWnd
,
&
cabinfo
,
NULL
);
done:
HeapFree
(
GetProcessHeap
(),
0
,
cmdline_copy
);
return
SUCCEEDED
(
hr
)
?
ADV_SUCCESS
:
ADV_FAILURE
;
}
...
...
dlls/advpack/tests/install.c
View file @
a27ae792
...
...
@@ -243,8 +243,7 @@ static void test_LaunchINFSectionEx()
/* try an invalid CAB filename with a relative INF name */
lstrcpy
(
cmdline
,
"test.inf,DefaultInstall,c:imacab.cab,4"
);
hr
=
pLaunchINFSectionEx
(
NULL
,
NULL
,
cmdline
,
0
);
todo_wine
ok
(
hr
==
E_INVALIDARG
,
"Expected E_INVALIDARG, got %d
\n
"
,
hr
);
ok
(
hr
==
E_INVALIDARG
,
"Expected E_INVALIDARG, got %d
\n
"
,
hr
);
DeleteFileA
(
"test.inf"
);
}
...
...
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