4.52 beta

This commit is contained in:
Igor Pavlov
2007-08-03 00:00:00 +00:00
committed by Kornel Lesiński
parent d14d4dcdef
commit 33ccab7e72
26 changed files with 912 additions and 135 deletions

View File

@@ -101,7 +101,7 @@ HRESULT CArchiveExtractCallback::GetTime(int index, PROPID propID, FILETIME &fil
if (prop.vt == VT_FILETIME)
{
filetime = prop.filetime;
filetimeIsDefined = true;
filetimeIsDefined = (filetime.dwHighDateTime != 0 || filetime.dwLowDateTime != 0);
}
else if (prop.vt != VT_EMPTY)
return E_FAIL;

View File

@@ -70,12 +70,9 @@ static bool IsSupportedName(const UString &name)
static UString GetCorrectFileName(const UString &path)
{
UString result = path;
UString test = path;
// test.Trim();
if (test == L"..")
result.Replace(L"..", L"");
return ReplaceIncorrectChars(result);
if (path == L".." || path == L".")
return UString();
return ReplaceIncorrectChars(path);
}
void MakeCorrectPath(UStringVector &pathParts)

View File

@@ -309,6 +309,7 @@ bool CCompressDialog::OnInit()
OnButtonSFX();
SetEncryptionMethod();
SetMemoryUsage();
return CModalDialog::OnInit();
}
@@ -350,6 +351,7 @@ bool CCompressDialog::OnButtonClicked(int buttonID, HWND buttonHWND)
case IDC_COMPRESS_SFX:
{
OnButtonSFX();
SetMemoryUsage();
return true;
}
case IDC_COMPRESS_CHECK_SHOW_PASSWORD:
@@ -604,7 +606,16 @@ bool CCompressDialog::OnCommand(int code, int itemID, LPARAM lParam)
{
case IDC_COMPRESS_COMBO_FORMAT:
{
OnChangeFormat();
bool isSFX = IsSFX();
SaveOptionsInMem();
SetLevel();
SetSolidBlockSize();
SetNumThreads();
SetParams();
CheckControlsEnable();
SetArchiveName2(isSFX);
SetEncryptionMethod();
SetMemoryUsage();
return true;
}
case IDC_COMPRESS_COMBO_LEVEL:
@@ -617,6 +628,7 @@ bool CCompressDialog::OnCommand(int code, int itemID, LPARAM lParam)
SetSolidBlockSize();
SetNumThreads();
CheckSFXNameChange();
SetMemoryUsage();
return true;
}
case IDC_COMPRESS_COMBO_METHOD:
@@ -626,6 +638,7 @@ bool CCompressDialog::OnCommand(int code, int itemID, LPARAM lParam)
SetSolidBlockSize();
SetNumThreads();
CheckSFXNameChange();
SetMemoryUsage();
return true;
}
case IDC_COMPRESS_COMBO_DICTIONARY:
@@ -673,19 +686,6 @@ void CCompressDialog::SetArchiveName2(bool prevWasSFX)
SetArchiveName(fileName);
}
void CCompressDialog::OnChangeFormat()
{
bool isSFX = IsSFX();
SaveOptionsInMem();
SetLevel();
SetSolidBlockSize();
SetNumThreads();
SetParams();
CheckControlsEnable();
SetArchiveName2(isSFX);
SetEncryptionMethod();
}
// if type.KeepName then use OriginalFileName
// else if !KeepName remove extension
// add new extension
@@ -939,10 +939,7 @@ void CCompressDialog::SetDictionary()
int methodID = GetMethodID();
UInt32 level = GetLevel2();
if (methodID < 0)
{
SetMemoryUsage();
return;
}
const UInt64 maxRamSize = GetMaxRamSizeForProgram();
switch (methodID)
{
@@ -1042,7 +1039,6 @@ void CCompressDialog::SetDictionary()
break;
}
}
SetMemoryUsage();
}
UInt32 CCompressDialog::GetComboValue(NWindows::NControl::CComboBox &c, int defMax)
@@ -1084,10 +1080,7 @@ void CCompressDialog::SetOrder()
int methodID = GetMethodID();
UInt32 level = GetLevel2();
if (methodID < 0)
{
SetMemoryUsage();
return;
}
switch (methodID)
{
case kLZMA:
@@ -1161,7 +1154,6 @@ void CCompressDialog::SetOrder()
break;
}
}
SetMemoryUsage();
}
bool CCompressDialog::GetOrderMode()

View File

@@ -98,7 +98,6 @@ class CCompressDialog: public NWindows::NControl::CModalDialog
int FindRegistryFormat(const UString &name);
int FindRegistryFormatAlways(const UString &name);
void OnChangeFormat();
void CheckSFXNameChange();
void SetArchiveName2(bool prevWasSFX);