mirror of
https://github.com/RetroDECK/ES-DE.git
synced 2024-11-22 06:05:38 +00:00
Added a check to MathUtil::md5Hash() to not attempt to hash directories
This commit is contained in:
parent
ee7bc6481e
commit
590591d0fb
|
@ -15,6 +15,7 @@
|
|||
|
||||
#include "utils/MathUtil.h"
|
||||
|
||||
#include "utils/FileSystemUtil.h"
|
||||
#include "utils/StringUtil.h"
|
||||
|
||||
#include <cstring>
|
||||
|
@ -108,6 +109,8 @@ namespace Utils
|
|||
state[3] = 0x10325476;
|
||||
|
||||
if (isFilePath) {
|
||||
if (Utils::FileSystem::isDirectory(hashArg))
|
||||
return "";
|
||||
#if defined(_WIN64)
|
||||
std::ifstream inputFile {Utils::String::stringToWideString(hashArg).c_str(),
|
||||
std::ios::binary};
|
||||
|
|
Loading…
Reference in a new issue