]> git.eshelyaron.com Git - emacs.git/commit
Fix the value of default-directory upon startup on MS-Windows
authorEli Zaretskii <eliz@gnu.org>
Fri, 7 Dec 2018 08:54:57 +0000 (10:54 +0200)
committerEli Zaretskii <eliz@gnu.org>
Fri, 7 Dec 2018 08:54:57 +0000 (10:54 +0200)
commite4a8f6ebbf4e8cf4d87d5b7b9940b61b51073fd3
tree9fa8559e3e0c6cd38625eba0ccff94144d4e0691
parentbcd74314626db88a8ff3c9deeb6ea7fbcd337413
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>.
src/emacs.c
src/w32.c
src/w32.h