summaryrefslogtreecommitdiff
path: root/src/w32.h
diff options
context:
space:
mode:
authorEli Zaretskii <eliz@gnu.org>2018-12-07 10:54:57 +0200
committerEli Zaretskii <eliz@gnu.org>2018-12-07 10:54:57 +0200
commite4a8f6ebbf4e8cf4d87d5b7b9940b61b51073fd3 (patch)
tree9fa8559e3e0c6cd38625eba0ccff94144d4e0691 /src/w32.h
parentbcd74314626db88a8ff3c9deeb6ea7fbcd337413 (diff)
downloademacs-e4a8f6ebbf4e8cf4d87d5b7b9940b61b51073fd3.tar.gz
emacs-e4a8f6ebbf4e8cf4d87d5b7b9940b61b51073fd3.tar.bz2
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.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/w32.h b/src/w32.h
index 42b3d98245f..5054b400c5b 100644
--- a/src/w32.h
+++ b/src/w32.h
@@ -201,6 +201,7 @@ extern int codepage_for_filenames (CPINFO *);
extern Lisp_Object ansi_encode_filename (Lisp_Object);
extern int w32_copy_file (const char *, const char *, int, int, int);
extern int w32_accessible_directory_p (const char *, ptrdiff_t);
+extern void w32_init_current_directory (void);
extern BOOL init_winsock (int load_now);
extern void srandom (int);