1038 |
if (NILP (default_directory)) |
if (NILP (default_directory)) |
1039 |
default_directory = current_buffer->directory; |
default_directory = current_buffer->directory; |
1040 |
if (! STRINGP (default_directory)) |
if (! STRINGP (default_directory)) |
1041 |
default_directory = build_string ("/"); |
{ |
1042 |
|
#ifdef DOS_NT |
1043 |
|
/* "/" is not considered a root directory on DOS_NT, so using "/" |
1044 |
|
here causes an infinite recursion in, e.g., the following: |
1045 |
|
|
1046 |
|
(let (default-directory) |
1047 |
|
(expand-file-name "a")) |
1048 |
|
|
1049 |
|
To avoid this, we set default_directory to the root of the |
1050 |
|
current drive. */ |
1051 |
|
extern char *emacs_root_dir (void); |
1052 |
|
|
1053 |
|
default_directory = build_string (emacs_root_dir ()); |
1054 |
|
#else |
1055 |
|
default_directory = build_string ("/"); |
1056 |
|
#endif |
1057 |
|
} |
1058 |
|
|
1059 |
if (!NILP (default_directory)) |
if (!NILP (default_directory)) |
1060 |
{ |
{ |