Skip to content

Commit

Permalink
Merge pull request #2890 from 15596858998/dec_1201
Browse files Browse the repository at this point in the history
fixbug CLI's -D fails when the argument is not a regular file
  • Loading branch information
terrelln authored Dec 6, 2021
2 parents 486472c + a8adfa7 commit e7b0ae3
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions programs/fileio.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit e7b0ae3

Please sign in to comment.