Skip to content

Commit 4c8cc10

Browse files
committed
Blockly, script path is now optional (if not used, script folder is used)
1 parent 7a66326 commit 4c8cc10

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

main/EventSystem.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2023,6 +2023,11 @@ bool CEventSystem::parseBlocklyActions(const std::string &Actions, const std::st
20232023
sParam = doWhat.substr(tpos + 1);
20242024
sParam = ParseBlocklyString(sParam);
20252025
}
2026+
#if !defined WIN32
2027+
if (sPath.find("/") != 0)
2028+
sPath = szUserDataFolder + "scripts/" + sPath;
2029+
#endif
2030+
20262031
m_sql.AddTaskItem(_tTaskItem::ExecuteScript(1, sPath, sParam));
20272032
actionsDone = true;
20282033
}

0 commit comments

Comments
 (0)