mirror of
https://github.com/luanti-org/luanti.git
synced 2025-08-16 18:01:40 +00:00
Introduce proper error handling for file streams
This commit is contained in:
parent
c38e0d05bf
commit
39fd9b93c3
23 changed files with 235 additions and 149 deletions
|
@ -710,7 +710,8 @@ std::string ShadowRenderer::readShaderFile(const std::string &path)
|
|||
prefix.append("#line 0\n");
|
||||
|
||||
std::string content;
|
||||
fs::ReadFile(path, content);
|
||||
if (!fs::ReadFile(path, content, true))
|
||||
return "";
|
||||
|
||||
return prefix + content;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue