TypesettingTools/Aegisub

[LUA] Lua Scripts that change the cwd also affect Aegisub

Totto16 opened this issue · 0 comments

I found out, that loading relative files didn't work when invoking aegisub from command line, so after some debugging, I found out, that this is caused by the DependencyControl module Logger.moon, that invokes lfs.chdir it changes the current working directory (cwd). Then aegisubs internal cwd also gets changed, which is an issue, since the relative files get resolved into absolute ones, AFTER loading lua plugins, now it isn't that hard to save the cwd before the loading of lua and then use it later in resolvinf relative files