allow MzScheme to start up if the current directory does not exist

svn: r8979
This commit is contained in:
Matthew Flatt 2008-03-15 13:19:56 +00:00
parent 651419aabc
commit 20a98a2f41

View File

@ -1051,14 +1051,20 @@ char *scheme_os_getcwd(char *buf, int buflen, int *actlen, int noexn)
if (!r) { if (!r) {
/* Something bad happened! */ /* Something bad happened! */
if (noexn) { if (noexn) {
/* We need to invent some complete path. */
#ifdef DOS_FILE_SYSTEM
r = "C:\\";
#else
r = "/";
#endif
if (actlen) if (actlen)
*actlen = 0; *actlen = strlen(r);
if (buf) { if (buf) {
buf[0] = 0; strcpy(buf, r);
return buf; return buf;
} else { } else {
return "."; return r;
} }
} }