4.41 beta

This commit is contained in:
Igor Pavlov
2006-05-09 00:00:00 +00:00
committed by Kornel Lesiński
parent bd9a40b0ed
commit 631462beb2
19 changed files with 209 additions and 194 deletions

View File

@@ -775,6 +775,17 @@ void CPanel::AddToArchive()
// KillSelection();
}
static UString GetSubFolderNameForExtract(const UString &archiveName)
{
int slashPos = archiveName.ReverseFind(L'\\');
int dotPos = archiveName.ReverseFind(L'.');
if (dotPos < 0 || slashPos > dotPos)
return archiveName + UString(L"~");
UString res = archiveName.Left(dotPos);
res.TrimRight();
return res;
}
void CPanel::ExtractArchives()
{
if (_parentFolders.Size() > 0)
@@ -800,7 +811,12 @@ void CPanel::ExtractArchives()
}
paths.Add(_currentFolderPrefix + GetItemRelPath(index));
}
::ExtractArchives(paths, _currentFolderPrefix, true);
UString folderName;
if (indices.Size() == 1)
folderName = GetSubFolderNameForExtract(GetItemRelPath(indices[0]));
else
folderName = L"*";
::ExtractArchives(paths, _currentFolderPrefix + folderName + UString(L"\\"), true);
}
void CPanel::TestArchives()