mirror of
https://github.com/WerWolv/ImHex.git
synced 2026-03-29 16:30:02 -05:00
sys: Refactor of filesystem functions. Fixed crashes where fs errors weren't caught correctly
Addresses the crash mentioned in #462
This commit is contained in:
@@ -184,8 +184,8 @@ namespace hex::pl {
|
||||
return true;
|
||||
}
|
||||
|
||||
bool PatternLanguage::executeFile(prv::Provider *provider, const fs::path &path, const std::map<std::string, Token::Literal> &envVars, const std::map<std::string, Token::Literal> &inVariables) {
|
||||
File file(path, File::Mode::Read);
|
||||
bool PatternLanguage::executeFile(prv::Provider *provider, const std::fs::path &path, const std::map<std::string, Token::Literal> &envVars, const std::map<std::string, Token::Literal> &inVariables) {
|
||||
fs::File file(path, fs::File::Mode::Read);
|
||||
|
||||
return this->executeString(provider, file.readString(), envVars, inVariables, true);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user