Allow file:/// protocol to be used to download the Mozilla ActiveX
control.
This commit is contained in:
parent
c02356b835
commit
18e909e650
|
@ -307,6 +307,7 @@ static DWORD WINAPI ThreadFunc( LPVOID info )
|
||||||
{
|
{
|
||||||
IBindStatusCallback *dl;
|
IBindStatusCallback *dl;
|
||||||
static const WCHAR szUrlVal[] = {'M','o','z','i','l','l','a','U','r','l',0};
|
static const WCHAR szUrlVal[] = {'M','o','z','i','l','l','a','U','r','l',0};
|
||||||
|
static const WCHAR szFileProtocol[] = {'f','i','l','e',':','/','/','/',0};
|
||||||
WCHAR path[MAX_PATH], szUrl[MAX_PATH];
|
WCHAR path[MAX_PATH], szUrl[MAX_PATH];
|
||||||
LPWSTR p;
|
LPWSTR p;
|
||||||
STARTUPINFOW si;
|
STARTUPINFOW si;
|
||||||
|
@ -330,6 +331,10 @@ static DWORD WINAPI ThreadFunc( LPVOID info )
|
||||||
if( r != ERROR_SUCCESS )
|
if( r != ERROR_SUCCESS )
|
||||||
goto end;
|
goto end;
|
||||||
|
|
||||||
|
if( !strncmpW(szUrl, szFileProtocol, strlenW(szFileProtocol)) )
|
||||||
|
lstrcpynW( path, szUrl+strlenW(szFileProtocol), MAX_PATH );
|
||||||
|
else
|
||||||
|
{
|
||||||
/* built the path for the download */
|
/* built the path for the download */
|
||||||
p = strrchrW( szUrl, '/' );
|
p = strrchrW( szUrl, '/' );
|
||||||
if (!p)
|
if (!p)
|
||||||
|
@ -346,6 +351,7 @@ static DWORD WINAPI ThreadFunc( LPVOID info )
|
||||||
IBindStatusCallback_Release( dl );
|
IBindStatusCallback_Release( dl );
|
||||||
if( (r != S_OK) || bCancelled )
|
if( (r != S_OK) || bCancelled )
|
||||||
goto end;
|
goto end;
|
||||||
|
}
|
||||||
|
|
||||||
/* run it */
|
/* run it */
|
||||||
memset( &si, 0, sizeof si );
|
memset( &si, 0, sizeof si );
|
||||||
|
|
Loading…
Reference in New Issue