mirror of
https://github.com/facebook/zstd.git
synced 2025-03-07 01:10:04 +02:00
fixbug CLI's -D fails when the argument is not a regular file
This commit is contained in:
parent
9ba07907c8
commit
a8adfa7f67
@ -742,6 +742,8 @@ static size_t FIO_createDictBuffer(void** bufferPtr, const char* fileName, FIO_p
|
||||
if (fileHandle==NULL) EXM_THROW(31, "%s: %s", fileName, strerror(errno));
|
||||
|
||||
fileSize = UTIL_getFileSize(fileName);
|
||||
if (fileSize == UTIL_FILESIZE_UNKNOWN)
|
||||
EXM_THROW(32, "This file format is not supported : Dictionary file %s\n", fileName);
|
||||
{
|
||||
size_t const dictSizeMax = prefs->patchFromMode ? prefs->memLimit : DICTSIZE_MAX;
|
||||
if (fileSize > dictSizeMax) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user