1
0
Fork 0

Force " " around path's giiven in the command line to support path's with spaces.

Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@608
This commit is contained in:
Sjoerd van der Berg 2002-12-29 00:16:44 +00:00
parent 2df4ad3de2
commit 1bd011d74b

View file

@ -157,14 +157,14 @@ void AUTOEXEC_Init(Section * sec) {
if (stat(buffer,&test)) goto nomount;
}
if (test.st_mode & S_IFDIR) {
SHELL_AddAutoexec("MOUNT C %s",buffer);
SHELL_AddAutoexec("MOUNT C \"%s\"",buffer);
SHELL_AddAutoexec("C:");
} else {
char * name=strrchr(buffer,CROSS_FILESPLIT);
if (!name) goto nomount;
*name++=0;
if (access(buffer,F_OK)) goto nomount;
SHELL_AddAutoexec("MOUNT C %s",buffer);
SHELL_AddAutoexec("MOUNT C \"%s\"",buffer);
SHELL_AddAutoexec("C:");
SHELL_AddAutoexec(name);
}