diff options
| author | Eli Zaretskii | 2018-12-07 10:54:57 +0200 |
|---|---|---|
| committer | Eli Zaretskii | 2018-12-07 10:54:57 +0200 |
| commit | e4a8f6ebbf4e8cf4d87d5b7b9940b61b51073fd3 (patch) | |
| tree | 9fa8559e3e0c6cd38625eba0ccff94144d4e0691 /src/w32.h | |
| parent | bcd74314626db88a8ff3c9deeb6ea7fbcd337413 (diff) | |
| download | emacs-e4a8f6ebbf4e8cf4d87d5b7b9940b61b51073fd3.tar.gz emacs-e4a8f6ebbf4e8cf4d87d5b7b9940b61b51073fd3.zip | |
Fix the value of default-directory upon startup on MS-Windows
* src/w32.c (w32_get_current_directory): New function.
(GetCachedVolumeInformation, init_environment): Use it.
(w32_init_current_directory): New function.
* src/w32.h (w32_init_current_directory): Add prototype.
* src/emacs.c (main) [WINDOWSNT]: Use w32_init_current_directory
to get the accurate value of cwd. This is needed to record
the correct directory in emacs_wd, which is now initialized
way earlier in the startup process, when init_environment was
not yet called. For details, see the problems reported in
http://lists.gnu.org/archive/html/emacs-devel/2018-12/msg00068.html.
Reported by Angelo Graziosi <angelo.g0@libero.it>.
Diffstat (limited to 'src/w32.h')
| -rw-r--r-- | src/w32.h | 1 |
1 files changed, 1 insertions, 0 deletions
| @@ -201,6 +201,7 @@ extern int codepage_for_filenames (CPINFO *); | |||
| 201 | extern Lisp_Object ansi_encode_filename (Lisp_Object); | 201 | extern Lisp_Object ansi_encode_filename (Lisp_Object); |
| 202 | extern int w32_copy_file (const char *, const char *, int, int, int); | 202 | extern int w32_copy_file (const char *, const char *, int, int, int); |
| 203 | extern int w32_accessible_directory_p (const char *, ptrdiff_t); | 203 | extern int w32_accessible_directory_p (const char *, ptrdiff_t); |
| 204 | extern void w32_init_current_directory (void); | ||
| 204 | 205 | ||
| 205 | extern BOOL init_winsock (int load_now); | 206 | extern BOOL init_winsock (int load_now); |
| 206 | extern void srandom (int); | 207 | extern void srandom (int); |