Skip to content
Snippets Groups Projects
Commit 04a97dee authored by rswindell's avatar rswindell
Browse files

Changed prep_path to convert backslashes to forward slashes on Unix.

parent f2b917ca
No related branches found
No related tags found
No related merge requests found
...@@ -42,6 +42,9 @@ const char *scfgnulstr=""; ...@@ -42,6 +42,9 @@ const char *scfgnulstr="";
void prep_path(char* base, char* path) void prep_path(char* base, char* path)
{ {
#ifdef __unix__
char *p;
#endif
char str[LEN_DIR*2]; char str[LEN_DIR*2];
if(!path[0]) if(!path[0])
...@@ -50,6 +53,13 @@ void prep_path(char* base, char* path) ...@@ -50,6 +53,13 @@ void prep_path(char* base, char* path)
sprintf(str,"%s%s",base,path); sprintf(str,"%s%s",base,path);
else else
strcpy(str,path); strcpy(str,path);
#ifdef __unix__ /* Change backslashes to forward slashes on Unix */
for(p=str;*p;p++)
if(*p=='\\')
*p='/';
#endif
backslashcolon(str); backslashcolon(str);
strcat(str,"."); // Change C: to C:. and C:\SBBS\ to C:\SBBS\. 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 _fullpath(path,str,LEN_DIR+1); // Change C:\SBBS\NODE1\..\EXEC to C:\SBBS\EXEC
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment