mirror of
https://github.com/luanti-org/luanti.git
synced 2025-10-23 20:55:43 +02: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