mirror of
https://github.com/luanti-org/luanti.git
synced 2026-01-12 12:15:26 +01:00
Introduce proper error handling for file streams
This commit is contained in:
@@ -160,10 +160,10 @@ public:
|
||||
private:
|
||||
StringMap m_programs;
|
||||
|
||||
std::string readFile(const std::string &path)
|
||||
inline std::string readFile(const std::string &path)
|
||||
{
|
||||
std::string ret;
|
||||
if (!fs::ReadFile(path, ret))
|
||||
if (!fs::ReadFile(path, ret, true))
|
||||
ret.clear();
|
||||
return ret;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user