mirror of https://github.com/odrling/Aegisub
Canonicalize Automation script file names for nicer errors
This commit is contained in:
parent
2be9218560
commit
646e5deb52
|
@ -29,7 +29,9 @@
|
|||
#include <memory>
|
||||
|
||||
namespace Automation4 {
|
||||
bool LoadFile(lua_State *L, agi::fs::path const& filename) {
|
||||
bool LoadFile(lua_State *L, agi::fs::path const& raw_filename) {
|
||||
auto filename = agi::fs::Canonicalize(raw_filename);
|
||||
|
||||
std::unique_ptr<std::istream> file(agi::io::Open(filename, true));
|
||||
file->seekg(0, std::ios::end);
|
||||
size_t size = file->tellg();
|
||||
|
|
Loading…
Reference in New Issue