diff options
author | Igor Pavlov <ipavlov@users.sourceforge.net> | 2008-05-05 04:00:00 +0400 |
---|---|---|
committer | Kornel LesiĆski <kornel@geekhood.net> | 2016-05-28 02:15:55 +0300 |
commit | 3901bf0ab88106a5b031cba7bc18d60cdebf7eef (patch) | |
tree | 808a2489abed822223b118b64e0553db80af6087 /CPP/7zip/UI/Far | |
parent | bd1fa36322ac27f5715433b388742893d6524516 (diff) |
4.58 beta
Diffstat (limited to 'CPP/7zip/UI/Far')
-rwxr-xr-x | CPP/7zip/UI/Far/ExtractEngine.cpp | 4 | ||||
-rwxr-xr-x | CPP/7zip/UI/Far/Plugin.cpp | 15 |
2 files changed, 15 insertions, 4 deletions
diff --git a/CPP/7zip/UI/Far/ExtractEngine.cpp b/CPP/7zip/UI/Far/ExtractEngine.cpp index c6583aae..2ffb14c1 100755 --- a/CPP/7zip/UI/Far/ExtractEngine.cpp +++ b/CPP/7zip/UI/Far/ExtractEngine.cpp @@ -101,13 +101,15 @@ STDMETHODIMP CExtractCallBackImp::AskOverwrite( *answer = NOverwriteAnswer::kAutoRename; break; default: - throw 20413; + return E_FAIL; } return S_OK; } STDMETHODIMP CExtractCallBackImp::PrepareOperation(const wchar_t *name, bool /* isFolder */, INT32 /* askExtractMode */, const UINT64 * /* position */) { + if(WasEscPressed()) + return E_ABORT; m_CurrentFilePath = name; return S_OK; } diff --git a/CPP/7zip/UI/Far/Plugin.cpp b/CPP/7zip/UI/Far/Plugin.cpp index c176ac92..40851c0c 100755 --- a/CPP/7zip/UI/Far/Plugin.cpp +++ b/CPP/7zip/UI/Far/Plugin.cpp @@ -68,6 +68,9 @@ static void MyGetFileTime(IFolderFolder *anArchiveFolder, UInt32 itemIndex, fileTime = propVariant.filetime; } } + +#define kDotsReplaceString "[[..]]" +#define kDotsReplaceStringU L"[[..]]" void CPlugin::ReadPluginPanelItem(PluginPanelItem &panelItem, UInt32 itemIndex) { @@ -83,6 +86,9 @@ void CPlugin::ReadPluginPanelItem(PluginPanelItem &panelItem, UInt32 itemIndex) if (oemString.Length() > kFileNameSizeMax) oemString = oemString.Left(kFileNameSizeMax); + if (oemString == "..") + oemString = kDotsReplaceString; + MyStringCopy(panelItem.FindData.cFileName, (const char *)oemString); panelItem.FindData.cAlternateFileName[0] = 0; @@ -194,12 +200,15 @@ void CPlugin::FreeFindData(struct PluginPanelItem *panelItems, } -void CPlugin::EnterToDirectory(const UString &aDirName) +void CPlugin::EnterToDirectory(const UString &dirName) { CMyComPtr<IFolderFolder> newFolder; - _folder->BindToFolder(aDirName, &newFolder); + UString s = dirName; + if (dirName == kDotsReplaceStringU) + s = L".."; + _folder->BindToFolder(s, &newFolder); if (newFolder == NULL) - if (aDirName.IsEmpty()) + if (dirName.IsEmpty()) return; else throw 40325; |