mirror of
https://github.com/Xevion/easy7zip.git
synced 2025-12-08 22:07:07 -06:00
9.14
This commit is contained in:
committed by
Kornel Lesiński
parent
3dacb5eb8a
commit
708873490e
@@ -163,40 +163,51 @@ HRESULT CPanel::OpenParentArchiveFolder()
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
static const wchar_t *kStartExtensions[] =
|
||||
{
|
||||
static const char *kStartExtensions =
|
||||
#ifdef UNDER_CE
|
||||
L"cab",
|
||||
" cab"
|
||||
#endif
|
||||
L"exe", L"bat", L"com",
|
||||
L"chm",
|
||||
L"msi", L"doc", L"xls", L"ppt", L"pps", L"wps", L"wpt", L"wks", L"xlr", L"wdb",
|
||||
" exe bat com"
|
||||
" chm"
|
||||
" msi doc xls ppt pps wps wpt wks xlr wdb"
|
||||
|
||||
L"docx", L"docm", L"dotx", L"dotm", L"xlsx", L"xlsm", L"xltx", L"xltm", L"xlsb",
|
||||
L"xlam", L"pptx", L"pptm", L"potx", L"potm", L"ppam", L"ppsx", L"ppsm", L"xsn",
|
||||
L"msg",
|
||||
L"dwf",
|
||||
" docx docm dotx dotm xlsx xlsm xltx xltm xlsb"
|
||||
" xlam pptx pptm potx potm ppam ppsx ppsm xsn"
|
||||
" mpp"
|
||||
" msg"
|
||||
" dwf"
|
||||
|
||||
L"flv", L"swf",
|
||||
" flv swf"
|
||||
|
||||
L"odt", L"ods",
|
||||
L"wb3",
|
||||
L"pdf"
|
||||
};
|
||||
" odt ods"
|
||||
" wb3"
|
||||
" pdf"
|
||||
" ";
|
||||
|
||||
static bool DoItemAlwaysStart(const UString &name)
|
||||
static bool FindExt(const char *p, const UString &name)
|
||||
{
|
||||
int extPos = name.ReverseFind('.');
|
||||
if (extPos < 0)
|
||||
return false;
|
||||
UString ext = name.Mid(extPos + 1);
|
||||
ext.MakeLower();
|
||||
for (int i = 0; i < sizeof(kStartExtensions) / sizeof(kStartExtensions[0]); i++)
|
||||
if (ext.Compare(kStartExtensions[i]) == 0)
|
||||
AString ext2 = UnicodeStringToMultiByte(ext);
|
||||
for (int i = 0; p[i] != 0;)
|
||||
{
|
||||
int j;
|
||||
for (j = i; p[j] != ' '; j++);
|
||||
if (ext2.Length() == j - i && memcmp(p + i, (const char *)ext2, ext2.Length()) == 0)
|
||||
return true;
|
||||
i = j + 1;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
static bool DoItemAlwaysStart(const UString &name)
|
||||
{
|
||||
return FindExt(kStartExtensions, name);
|
||||
}
|
||||
|
||||
static UString GetQuotedString(const UString &s)
|
||||
{
|
||||
return UString(L'\"') + s + UString(L'\"');
|
||||
|
||||
Reference in New Issue
Block a user