diff options
Diffstat (limited to 'CPP/7zip/Bundles/SFXCon/Main.cpp')
-rwxr-xr-x | CPP/7zip/Bundles/SFXCon/Main.cpp | 31 |
1 files changed, 14 insertions, 17 deletions
diff --git a/CPP/7zip/Bundles/SFXCon/Main.cpp b/CPP/7zip/Bundles/SFXCon/Main.cpp index ac8c1cdf..140f8364 100755 --- a/CPP/7zip/Bundles/SFXCon/Main.cpp +++ b/CPP/7zip/Bundles/SFXCon/Main.cpp @@ -5,26 +5,15 @@ #include "Common/MyInitGuid.h" #include "Common/CommandLineParser.h" -#include "Common/MyCom.h" #include "Common/MyException.h" -#include "Common/StdOutStream.h" -#include "Common/StringConvert.h" -#include "Common/Wildcard.h" -#include "Windows/Defs.h" -#include "Windows/FileName.h" #ifdef _WIN32 #include "Windows/DLL.h" #include "Windows/FileDir.h" #endif -#include "../../IPassword.h" -#include "../../ICoder.h" - -#include "../../UI/Common/DefaultName.h" #include "../../UI/Common/ExitCode.h" #include "../../UI/Common/Extract.h" -#include "../../UI/Common/OpenArchive.h" #include "../../UI/Console/ExtractCallbackConsole.h" #include "../../UI/Console/List.h" @@ -36,6 +25,7 @@ using namespace NWindows; using namespace NFile; using namespace NCommandLineParser; +int g_CodePage = -1; extern CStdOutStream *g_StdStream; static const char *kCopyrightString = @@ -343,10 +333,7 @@ int Main2( if(passwordEnabled) password = parser[NKey::kPassword].PostStrings[0]; - NFind::CFileInfoW archiveFileInfo; - if (!NFind::FindFile(arcPath, archiveFileInfo)) - throw kCantFindSFX; - if (archiveFileInfo.IsDir()) + if (!NFind::DoesFileExist(arcPath)) throw kCantFindSFX; UString outputDir; @@ -380,14 +367,21 @@ int Main2( CExtractCallbackConsole *ecs = new CExtractCallbackConsole; CMyComPtr<IFolderArchiveExtractCallback> extractCallback = ecs; ecs->OutStream = g_StdStream; + + #ifndef _NO_CRYPTO ecs->PasswordIsDefined = passwordEnabled; ecs->Password = password; + #endif + ecs->Init(); COpenCallbackConsole openCallback; openCallback.OutStream = g_StdStream; + + #ifndef _NO_CRYPTO openCallback.PasswordIsDefined = passwordEnabled; openCallback.Password = password; + #endif CExtractOptions eo; eo.StdOutMode = false; @@ -429,11 +423,14 @@ int Main2( UInt64 numErrors = 0; HRESULT result = ListArchives( codecs, CIntVector(), + false, v1, v2, wildcardCensorHead, true, false, - passwordEnabled, - password, numErrors); + #ifndef _NO_CRYPTO + passwordEnabled, password, + #endif + numErrors); if (numErrors > 0) { g_StdOut << endl << "Errors: " << numErrors; |