mirror of
https://github.com/Xevion/easy7zip.git
synced 2025-12-06 21:14:58 -06:00
21.02
This commit is contained in:
@@ -48,9 +48,7 @@ public:
|
||||
CMyComPtr<IProgress> UpdateCallback;
|
||||
CUpdateCallback100Imp *UpdateCallbackSpec;
|
||||
|
||||
HRESULT Result;
|
||||
|
||||
CThreadFolderOperations(EFolderOpType opType): OpType(opType), Result(E_FAIL) {}
|
||||
CThreadFolderOperations(EFolderOpType opType): OpType(opType) {}
|
||||
HRESULT DoOperation(CPanel &panel, const UString &progressTitle, const UString &titleError);
|
||||
};
|
||||
|
||||
@@ -60,18 +58,14 @@ HRESULT CThreadFolderOperations::ProcessVirt()
|
||||
switch (OpType)
|
||||
{
|
||||
case FOLDER_TYPE_CREATE_FOLDER:
|
||||
Result = FolderOperations->CreateFolder(Name, UpdateCallback);
|
||||
break;
|
||||
return FolderOperations->CreateFolder(Name, UpdateCallback);
|
||||
case FOLDER_TYPE_DELETE:
|
||||
Result = FolderOperations->Delete(&Indices.Front(), Indices.Size(), UpdateCallback);
|
||||
break;
|
||||
return FolderOperations->Delete(&Indices.Front(), Indices.Size(), UpdateCallback);
|
||||
case FOLDER_TYPE_RENAME:
|
||||
Result = FolderOperations->Rename(Index, Name, UpdateCallback);
|
||||
break;
|
||||
return FolderOperations->Rename(Index, Name, UpdateCallback);
|
||||
default:
|
||||
Result = E_FAIL;
|
||||
return E_FAIL;
|
||||
}
|
||||
return Result;
|
||||
}
|
||||
|
||||
|
||||
@@ -83,7 +77,6 @@ HRESULT CThreadFolderOperations::DoOperation(CPanel &panel, const UString &progr
|
||||
|
||||
WaitMode = true;
|
||||
Sync.FinalMessage.ErrorMessage.Title = titleError;
|
||||
Result = S_OK;
|
||||
|
||||
UpdateCallbackSpec->Init();
|
||||
|
||||
@@ -94,7 +87,6 @@ HRESULT CThreadFolderOperations::DoOperation(CPanel &panel, const UString &progr
|
||||
UpdateCallbackSpec->Password = fl.Password;
|
||||
}
|
||||
|
||||
|
||||
MainWindow = panel._mainWindow; // panel.GetParent()
|
||||
MainTitle = "7-Zip"; // LangString(IDS_APP_TITLE);
|
||||
MainAddTitle = progressTitle + L' ';
|
||||
@@ -274,9 +266,9 @@ BOOL CPanel::OnBeginLabelEdit(LV_DISPINFOW * lpnmh)
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
bool IsCorrectFsName(const UString &name)
|
||||
static bool IsCorrectFsName(const UString &name)
|
||||
{
|
||||
const UString lastPart = name.Ptr(name.ReverseFind_PathSepar() + 1);
|
||||
const UString lastPart = name.Ptr((unsigned)(name.ReverseFind_PathSepar() + 1));
|
||||
return
|
||||
lastPart != L"." &&
|
||||
lastPart != L"..";
|
||||
@@ -410,7 +402,7 @@ void CPanel::CreateFolder()
|
||||
{
|
||||
int pos = newName.Find(WCHAR_PATH_SEPARATOR);
|
||||
if (pos >= 0)
|
||||
newName.DeleteFrom(pos);
|
||||
newName.DeleteFrom((unsigned)(pos));
|
||||
if (!_mySelectMode)
|
||||
state.SelectedNames.Clear();
|
||||
state.FocusedName = newName;
|
||||
@@ -461,7 +453,7 @@ void CPanel::CreateFile()
|
||||
}
|
||||
int pos = newName.Find(WCHAR_PATH_SEPARATOR);
|
||||
if (pos >= 0)
|
||||
newName.DeleteFrom(pos);
|
||||
newName.DeleteFrom((unsigned)pos);
|
||||
if (!_mySelectMode)
|
||||
state.SelectedNames.Clear();
|
||||
state.FocusedName = newName;
|
||||
|
||||
Reference in New Issue
Block a user