diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/fileio.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/fileio.c b/src/fileio.c index ce8172df03d..3385da52da0 100644 --- a/src/fileio.c +++ b/src/fileio.c | |||
| @@ -5627,8 +5627,13 @@ provides a file dialog box..") | |||
| 5627 | /* If dir starts with user's homedir, change that to ~. */ | 5627 | /* If dir starts with user's homedir, change that to ~. */ |
| 5628 | homedir = (char *) egetenv ("HOME"); | 5628 | homedir = (char *) egetenv ("HOME"); |
| 5629 | #ifdef DOS_NT | 5629 | #ifdef DOS_NT |
| 5630 | homedir = strcpy (alloca (strlen (homedir) + 1), homedir); | 5630 | /* homedir can be NULL in temacs, since Vprocess_environment is not |
| 5631 | CORRECT_DIR_SEPS (homedir); | 5631 | yet set up. We shouldn't crash in that case. */ |
| 5632 | if (homedir != 0) | ||
| 5633 | { | ||
| 5634 | homedir = strcpy (alloca (strlen (homedir) + 1), homedir); | ||
| 5635 | CORRECT_DIR_SEPS (homedir); | ||
| 5636 | } | ||
| 5632 | #endif | 5637 | #endif |
| 5633 | if (homedir != 0 | 5638 | if (homedir != 0 |
| 5634 | && STRINGP (dir) | 5639 | && STRINGP (dir) |