diff options
Diffstat (limited to 'CPP/7zip/UI/Far/Far.cpp')
-rw-r--r-- | CPP/7zip/UI/Far/Far.cpp | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/CPP/7zip/UI/Far/Far.cpp b/CPP/7zip/UI/Far/Far.cpp index d5656e29..0cd53cc5 100644 --- a/CPP/7zip/UI/Far/Far.cpp +++ b/CPP/7zip/UI/Far/Far.cpp @@ -373,18 +373,21 @@ static HANDLE MyOpenFilePluginW(const wchar_t *name) HRESULT result = ::OpenArchive(fullName, &archiveHandler, archiverInfoResult, defaultName, openArchiveCallback); */ + if (result == E_ABORT) + return (HANDLE)-2; + + UString errorMessage = agent->GetErrorMessage(); + if (!errorMessage.IsEmpty()) + g_StartupInfo.ShowErrorMessage(UnicodeStringToMultiByte(errorMessage, CP_OEMCP)); + if (result != S_OK) { - if (result == E_ABORT) - return (HANDLE)-2; + if (result == S_FALSE) + return INVALID_HANDLE_VALUE; ShowSysErrorMessage(result); return INVALID_HANDLE_VALUE; } - UString errorMessage = agent->GetErrorMessage(); - if (!errorMessage.IsEmpty()) - g_StartupInfo.ShowErrorMessage(UnicodeStringToMultiByte(errorMessage, CP_OEMCP)); - // ::OutputDebugStringA("after OpenArchive\n"); CPlugin *plugin = new CPlugin( |