Skip to content
Extraits de code Groupes Projets
Valider 6d81a91c rédigé par Thomas Goyne's avatar Thomas Goyne
Parcourir les fichiers

Ignore errors when canonicalizing paths for automation

It's only being done to make the error reporting prettier, so it failing
shouldn't block the loading of the file.
parent 9dfe12d3
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
...@@ -31,7 +31,13 @@ ...@@ -31,7 +31,13 @@
namespace Automation4 { namespace Automation4 {
bool LoadFile(lua_State *L, agi::fs::path const& raw_filename) { bool LoadFile(lua_State *L, agi::fs::path const& raw_filename) {
auto filename = agi::fs::Canonicalize(raw_filename); auto filename = raw_filename;
try {
filename = agi::fs::Canonicalize(raw_filename);
}
catch (agi::fs::FileSystemUnknownError const& e) {
LOG_E("auto4/lua") << "Error canonicalizing path: " << e.GetChainedMessage();
}
std::unique_ptr<std::istream> file(agi::io::Open(filename, true)); std::unique_ptr<std::istream> file(agi::io::Open(filename, true));
file->seekg(0, std::ios::end); file->seekg(0, std::ios::end);
......
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Veuillez vous inscrire ou vous pour commenter