Skip to content

Commit

Permalink
[linux] Import: save Script***Utf8 variable
Browse files Browse the repository at this point in the history
  • Loading branch information
pinterf committed Mar 5, 2020
1 parent 10dfbd9 commit 27fceb4
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions avs_core/core/parser/script.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -722,11 +722,17 @@ AVSValue Import(AVSValue args, void*, IScriptEnvironment* env)
env->SetGlobalVar("$ScriptName$", env->SaveString(script_name));
env->SetGlobalVar("$ScriptFile$", env->SaveString(file_part.c_str()));
env->SetGlobalVar("$ScriptDir$", env->SaveString(full_path.c_str()));
env->SetGlobalVar("$ScriptNameUtf8$", env->SaveString(script_name));
env->SetGlobalVar("$ScriptFileUtf8$", env->SaveString(file_part.c_str()));
env->SetGlobalVar("$ScriptDirUtf8$", env->SaveString(full_path.c_str()));
if (MainScript)
{
env->SetGlobalVar("$MainScriptName$", env->SaveString(script_name));
env->SetGlobalVar("$MainScriptFile$", env->SaveString(file_part.c_str()));
env->SetGlobalVar("$MainScriptDir$", env->SaveString(full_path.c_str()));
env->SetGlobalVar("$MainScriptNameUtf8$", env->SaveString(script_name));
env->SetGlobalVar("$MainScriptFileUtf8$", env->SaveString(file_part.c_str()));
env->SetGlobalVar("$MainScriptDirUtf8$", env->SaveString(full_path.c_str()));
}

//*file_part = 0; // trunc full_path to dir-only
Expand Down

0 comments on commit 27fceb4

Please sign in to comment.