Commit 79808429 authored by Sergey Guralnik's avatar Sergey Guralnik Committed by Alexandre Julliard

winemenubuilder: Try to wait for creating icon files.

parent 1dc3ef51
...@@ -1055,10 +1055,19 @@ static HRESULT open_icon(LPCWSTR filename, int index, BOOL bWait, IStream **ppSt ...@@ -1055,10 +1055,19 @@ static HRESULT open_icon(LPCWSTR filename, int index, BOOL bWait, IStream **ppSt
hr = open_module_icon(filename, index, ppStream); hr = open_module_icon(filename, index, ppStream);
if (FAILED(hr)) if (FAILED(hr))
{ {
static const WCHAR dot_icoW[] = {'.','i','c','o',0}; if(bWait && hr == HRESULT_FROM_WIN32(ERROR_MOD_NOT_FOUND))
int len = strlenW(filename); {
if (len >= 4 && strcmpiW(&filename[len - 4], dot_icoW) == 0) WINE_WARN("Can't find file: %s, give a chance to parent process to create it\n",
hr = SHCreateStreamOnFileW(filename, STGM_READ, ppStream); wine_dbgstr_w(filename));
return hr;
}
else
{
static const WCHAR dot_icoW[] = {'.','i','c','o',0};
int len = strlenW(filename);
if (len >= 4 && strcmpiW(&filename[len - 4], dot_icoW) == 0)
hr = SHCreateStreamOnFileW(filename, STGM_READ, ppStream);
}
} }
if (FAILED(hr)) if (FAILED(hr))
hr = open_file_type_icon(filename, ppStream); hr = open_file_type_icon(filename, ppStream);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment