mirror of
https://github.com/Xevion/easy7zip.git
synced 2025-12-16 06:11:48 -06:00
9.04 beta
This commit is contained in:
committed by
Kornel Lesiński
parent
8874e4fbc9
commit
829409452d
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user