mirror of https://github.com/odrling/Aegisub
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.
This commit is contained in:
parent
41ce8d7c31
commit
22e4a8bd58
|
@ -31,7 +31,13 @@
|
|||
|
||||
namespace Automation4 {
|
||||
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));
|
||||
file->seekg(0, std::ios::end);
|
||||
|
|
Loading…
Reference in New Issue