mirror of
https://github.com/Xevion/easy7zip.git
synced 2025-12-08 04:07:02 -06:00
21.07
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user