mirror of
https://github.com/Xevion/easy7zip.git
synced 2025-12-08 12:07:03 -06:00
21.07
This commit is contained in:
@@ -48,7 +48,7 @@ STDMETHODIMP COpenCallbackImp::GetProperty(PROPID propID, PROPVARIANT *value)
|
||||
else
|
||||
switch (propID)
|
||||
{
|
||||
case kpidName: prop = _fileInfo.Name; break;
|
||||
case kpidName: prop = fs2us(_fileInfo.Name); break;
|
||||
case kpidIsDir: prop = _fileInfo.IsDir(); break;
|
||||
case kpidSize: prop = _fileInfo.Size; break;
|
||||
case kpidAttrib: prop = (UInt32)_fileInfo.Attrib; break;
|
||||
@@ -103,12 +103,20 @@ STDMETHODIMP COpenCallbackImp::GetStream(const wchar_t *name, IInStream **inStre
|
||||
if (!IsSafePath(name2))
|
||||
return S_FALSE;
|
||||
|
||||
// #ifdef _WIN32
|
||||
// we don't want to support wildcards in names here here
|
||||
if (name2.Find(L'?') >= 0 ||
|
||||
name2.Find(L'*') >= 0)
|
||||
#ifdef _WIN32
|
||||
/* WIN32 allows wildcards in Find() function
|
||||
and doesn't allow wildcard in File.Open()
|
||||
so we can work without the following wildcard check here */
|
||||
if (name2.Find(L'*') >= 0)
|
||||
return S_FALSE;
|
||||
// #endif
|
||||
{
|
||||
int startPos = 0;
|
||||
if (name2.IsPrefixedBy_Ascii_NoCase("\\\\?\\"))
|
||||
startPos = 3;
|
||||
if (name2.Find(L'?', startPos) >= 0)
|
||||
return S_FALSE;
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
Reference in New Issue
Block a user