From c4ecdec8b7b046e38c3589339e557aab2557ec28 Mon Sep 17 00:00:00 2001
From: rswindell <>
Date: Sun, 26 Apr 2020 06:58:46 +0000
Subject: [PATCH] Use relative paths for xtrn startup_dir directories. And
 forward-slashes. This makes the config files more portable/migratable.

---
 exec/install-xtrn.js | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/exec/install-xtrn.js b/exec/install-xtrn.js
index 59df457a03..0e98ab3e9f 100644
--- a/exec/install-xtrn.js
+++ b/exec/install-xtrn.js
@@ -91,6 +91,7 @@ const REVISION = "$Revision$".split(' ')[1];
 const ini_fname = "install-xtrn.ini";
 
 load("sbbsdefs.js");
+var relpath = load({}, "relpath.js");
 
 var options = {
 	debug: false,
@@ -160,7 +161,7 @@ function install_xtrn_item(cnf, type, name, desc, item)
 
 		var which;
 		while ((!which || which > xtrn_area.sec_list.length) && !aborted())
-			which = js.global.prompt("Install " + item.name  + " into which External Program Section");
+			which = js.global.prompt("Install " + item.name  + " into which section");
 		if(aborted())
 			return false;
 		which = parseInt(which, 10);
@@ -232,7 +233,7 @@ function install(ini_fname)
 		return "Failed to read " + system.ctrl_dir + "xtrn.cnf";
 	
 	var startup_dir = ini_fname.substr(0, Math.max(ini_fname.lastIndexOf("/"), ini_fname.lastIndexOf("\\"), 0));
-	startup_dir = backslash(startup_dir);
+	startup_dir = relpath.get(system.ctrl_dir, startup_dir);
 
 	const types = {
 		prog:	{ desc: "External Program", 	struct: "xtrn" },
-- 
GitLab