Update to 7-Zip Version 21.07

See: https://sourceforge.net/p/sevenzip/discussion/45797/thread/0a7b47970b/
This commit is contained in:
Tino Reichardt
2022-08-07 09:51:50 +02:00
parent e3067bf67b
commit 6a4fe97fc3
89 changed files with 3476 additions and 441 deletions

View File

@@ -767,6 +767,15 @@ static HRESULT EnumerateDirItems(
const UString &name = item.PathParts.Front();
FString fullPath = phyPrefix + us2fs(name);
/*
// not possible now
if (!item.ForDir && !item.ForFile)
{
RINOK(dirItems.AddError(fullPath, ERROR_INVALID_PARAMETER));
continue;
}
*/
#if defined(_WIN32) && !defined(UNDER_CE)
bool needAltStreams = true;
#endif
@@ -823,9 +832,20 @@ static HRESULT EnumerateDirItems(
continue;
}
/*
#ifdef _WIN32
#define MY_ERROR_IS_DIR ERROR_FILE_NOT_FOUND
#define MY_ERROR_NOT_DIR DI_DEFAULT_ERROR
#else
#define MY_ERROR_IS_DIR EISDIR
#define MY_ERROR_NOT_DIR ENOTDIR
#endif
*/
const bool isDir = fi.IsDir();
if ((isDir && !item.ForDir) || (!isDir && !item.ForFile))
if (isDir ? !item.ForDir : !item.ForFile)
{
// RINOK(dirItems.AddError(fullPath, isDir ? MY_ERROR_IS_DIR: MY_ERROR_NOT_DIR));
RINOK(dirItems.AddError(fullPath, DI_DEFAULT_ERROR));
continue;
}