Compile Shaders now as well
This commit is contained in:
@ -20,7 +20,8 @@ inline std::string fix_path(const std::string &path)
|
||||
inline std::string stupid_hash(const std::string &file)
|
||||
{
|
||||
std::ifstream iff(file);
|
||||
if(!iff.is_open()) {
|
||||
if (!iff.is_open())
|
||||
{
|
||||
return std::to_string(rand());
|
||||
}
|
||||
unsigned long long check_sum = 0x0ULL;
|
||||
@ -44,10 +45,13 @@ createHashes(const std::vector<std::string> &dirs,
|
||||
{
|
||||
for (const auto &file : std::filesystem::directory_iterator(it))
|
||||
{
|
||||
if (file.is_regular_file() && file.path().extension() == extension)
|
||||
if (file.is_regular_file())
|
||||
{
|
||||
std::string path = fix_path(file.path().string());
|
||||
hashes[path] = stupid_hash(path);
|
||||
if (path.length() > extension.length() && path.ends_with(extension))
|
||||
{
|
||||
hashes[path] = stupid_hash(path);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user