From bdf1848d50b2912ce1c9bc8b00bb593743f7b422 Mon Sep 17 00:00:00 2001
From: rswindell <>
Date: Tue, 5 May 2020 01:09:27 +0000
Subject: [PATCH] Move exec/jsexec.ini to ctrl/jsexec.ini if it exists.

---
 exec/update.js | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/exec/update.js b/exec/update.js
index 29bfbe4556..7e8462d0c9 100644
--- a/exec/update.js
+++ b/exec/update.js
@@ -141,6 +141,14 @@ if(!xtrn_area.prog["avatchoo"] && !xtrn_area.event["avat-out"]) {
 print("Updating [General] Text File Section indexes");
 print(update_gfile_indexes() + " indexes updated.");
 
+var src = system.exec_dir + "jsexec.ini";
+var dst = system.ctrl_dir + "jsexec.ini";
+if(file_exists(src) && !file_exists(dst)) {
+	print("Moving " + src + " to " + dst);
+	if(!file_rename(src, dst))
+		alert("Could not move '" + src + "' to '" + dst + "'");
+}
+
 print("Updating (compiling) Baja modules");
 var src_files = directory(system.exec_dir + "*.src");
 for(var i in src_files) {
-- 
GitLab