From 04a97dee47e6c092038371eefc08b34cb045494a Mon Sep 17 00:00:00 2001
From: rswindell <>
Date: Mon, 6 Nov 2000 10:23:43 +0000
Subject: [PATCH] Changed prep_path to convert backslashes to forward slashes
 on Unix.

---
 src/sbbs3/scfglib1.c | 12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)

diff --git a/src/sbbs3/scfglib1.c b/src/sbbs3/scfglib1.c
index 9f2df7e43b..c561daac59 100644
--- a/src/sbbs3/scfglib1.c
+++ b/src/sbbs3/scfglib1.c
@@ -42,7 +42,10 @@ const char *scfgnulstr="";
 
 void prep_path(char* base, char* path)
 {
-	char str[LEN_DIR*2];
+#ifdef __unix__
+	char	*p;
+#endif
+	char	str[LEN_DIR*2];
 
 	if(!path[0])
 		return;
@@ -50,6 +53,13 @@ void prep_path(char* base, char* path)
 		sprintf(str,"%s%s",base,path);
 	else
 		strcpy(str,path);
+
+#ifdef __unix__				/* Change backslashes to forward slashes on Unix */
+	for(p=str;*p;p++)
+		if(*p=='\\') 
+			*p='/';
+#endif
+
 	backslashcolon(str);
 	strcat(str,".");                // Change C: to C:. and C:\SBBS\ to C:\SBBS\.
 	_fullpath(path,str,LEN_DIR+1);	// Change C:\SBBS\NODE1\..\EXEC to C:\SBBS\EXEC
-- 
GitLab