Fix the current directory of the Emacs process on MS-Windows.
authorEli Zaretskii <eliz@gnu.org>
Fri, 29 Jun 2012 13:11:54 +0000 (16:11 +0300)
committerEli Zaretskii <eliz@gnu.org>
Fri, 29 Jun 2012 13:11:54 +0000 (16:11 +0300)
commit8d38f4616b85a226221e599c34e55298bb54d3cc
tree8edee1c820e7c335ede557b632786bb4e7ff4512
parent2af3565e0f2b325924e4adad26a08b442fa022ac
Fix the current directory of the Emacs process on MS-Windows.

 src/w32.c (getwd): Adjust commentary about startup_dir.
 (init_environment): Always call sys_access, even in non-MSVC
 builds.  Don't chdir to the directory of the Emacs executable.
 This undoes code from 1997 which was justified by the need to
 "avoid conflicts when removing and renaming directories".  But its
 downside was that every relative file name was being interpreted
 relative to the directory of the Emacs executable, which can never
 be TRT.  In particular, it broke sys_access when called with
 relative file names.
 (sys_access): Map GetLastError to errno.
src/ChangeLog
src/w32.c