Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/kornelski/7z.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIgor Pavlov <ipavlov@users.sourceforge.net>2009-06-02 04:00:00 +0400
committerKornel LesiƄski <kornel@geekhood.net>2016-05-28 02:15:59 +0300
commit829409452d85cd6dd9dfc9151f109d6e13a2bb1c (patch)
treee0acaea47044d167f35fa197584dee1bde41c329 /CPP/7zip/UI/FileManager/FileFolderPluginOpen.cpp
parent8874e4fbc9faabdcff719b9b2ac8ebad4f282bbe (diff)
9.04 beta
Diffstat (limited to 'CPP/7zip/UI/FileManager/FileFolderPluginOpen.cpp')
-rwxr-xr-xCPP/7zip/UI/FileManager/FileFolderPluginOpen.cpp35
1 files changed, 16 insertions, 19 deletions
diff --git a/CPP/7zip/UI/FileManager/FileFolderPluginOpen.cpp b/CPP/7zip/UI/FileManager/FileFolderPluginOpen.cpp
index 3cd79da0..992fbd8c 100755
--- a/CPP/7zip/UI/FileManager/FileFolderPluginOpen.cpp
+++ b/CPP/7zip/UI/FileManager/FileFolderPluginOpen.cpp
@@ -4,21 +4,15 @@
#include "resource.h"
-#include "Common/StringConvert.h"
-#include "Windows/Defs.h"
-#include "Windows/FileDir.h"
-#include "Windows/FileName.h"
-#include "Windows/DLL.h"
#include "Windows/Thread.h"
-#include "IFolder.h"
-#include "RegistryAssociations.h"
-#include "RegistryPlugins.h"
+#include "../Agent/Agent.h"
+#include "LangUtils.h"
#include "OpenCallback.h"
#include "PluginLoader.h"
-#include "LangUtils.h"
-#include "../Agent/Agent.h"
+#include "RegistryAssociations.h"
+#include "RegistryPlugins.h"
using namespace NWindows;
using namespace NRegistryAssociations;
@@ -26,6 +20,7 @@ using namespace NRegistryAssociations;
struct CThreadArchiveOpen
{
UString Path;
+ CMyComPtr<IInStream> InStream;
CMyComPtr<IFolderManager> FolderManager;
CMyComPtr<IProgress> OpenCallback;
COpenArchiveCallback *OpenCallbackSpec;
@@ -36,7 +31,7 @@ struct CThreadArchiveOpen
void Process()
{
OpenCallbackSpec->ProgressDialog.WaitCreating();
- Result = FolderManager->OpenFolderFile(Path, &Folder, OpenCallback);
+ Result = FolderManager->OpenFolderFile(InStream, Path, &Folder, OpenCallback);
OpenCallbackSpec->ProgressDialog.MyClose();
}
@@ -57,6 +52,7 @@ static int FindPlugin(const CObjectVector<CPluginInfo> &plugins,
}
HRESULT OpenFileFolderPlugin(
+ IInStream *inStream,
const UString &path,
HMODULE *module,
IFolderFolder **resultFolder,
@@ -66,13 +62,7 @@ HRESULT OpenFileFolderPlugin(
CObjectVector<CPluginInfo> plugins;
ReadFileFolderPluginInfoList(plugins);
- UString extension;
- UString name, pureName, dot;
-
- if(!NFile::NDirectory::GetOnlyName(path, name))
- return E_FAIL;
- NFile::NName::SplitNameToPureNameAndExtension(name, pureName, dot, extension);
-
+ UString extension, name, pureName, dot;
int slashPos = path.ReverseFind(WCHAR_PATH_SEPARATOR);
UString dirPrefix;
@@ -85,6 +75,8 @@ HRESULT OpenFileFolderPlugin(
else
fileName = path;
+ NFile::NName::SplitNameToPureNameAndExtension(fileName, pureName, dot, extension);
+
if (!extension.IsEmpty())
{
CExtInfo extInfo;
@@ -122,8 +114,13 @@ HRESULT OpenFileFolderPlugin(
t.OpenCallbackSpec->PasswordIsDefined = encrypted;
t.OpenCallbackSpec->Password = password;
t.OpenCallbackSpec->ParentWindow = parentWindow;
- t.OpenCallbackSpec->LoadFileInfo(dirPrefix, fileName);
+ if (inStream)
+ t.OpenCallbackSpec->SetSubArchiveName(fileName);
+ else
+ t.OpenCallbackSpec->LoadFileInfo(dirPrefix, fileName);
+
+ t.InStream = inStream;
t.Path = path;
UString progressTitle = LangString(IDS_OPENNING, 0x03020283);