diff options
author | Eli Zaretskii <eliz@gnu.org> | 2013-10-26 15:14:33 +0300 |
---|---|---|
committer | Eli Zaretskii <eliz@gnu.org> | 2013-10-26 15:14:33 +0300 |
commit | 5c4a19a90f803ed46629c2bdc1ac3d3563caa738 (patch) | |
tree | d9e33430f67ad451d7777a819273a615a0f662f7 /src/fileio.c | |
parent | c3e9160b8c375760d6bc53602caeed211e91389d (diff) | |
download | emacs-5c4a19a90f803ed46629c2bdc1ac3d3563caa738.tar.gz |
getcwd and dflt_passwd stuff is done.
Diffstat (limited to 'src/fileio.c')
-rw-r--r-- | src/fileio.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/fileio.c b/src/fileio.c index a1dcb72b4e4..dc6d80932c4 100644 --- a/src/fileio.c +++ b/src/fileio.c @@ -1267,6 +1267,11 @@ filesystem tree, not (expand-file-name ".." dirname). */) indirectly by prepending newdir to nm if necessary, and using cwd (or the wd of newdir's drive) as the new newdir. */ char *adir; +#ifdef WINDOWSNT + const int adir_size = MAX_UTF8_PATH; +#else + const int adir_size = MAXPATHLEN + 1; +#endif if (IS_DRIVE (newdir[0]) && IS_DEVICE_SEP (newdir[1])) { @@ -1282,14 +1287,14 @@ filesystem tree, not (expand-file-name ".." dirname). */) strcat (tmp, nm); nm = tmp; } - adir = alloca (MAXPATHLEN + 1); + adir = alloca (adir_size); if (drive) { if (!getdefdir (c_toupper (drive) - 'A' + 1, adir)) strcpy (adir, "/"); } else - getcwd (adir, MAXPATHLEN + 1); + getcwd (adir, adir_size); if (multibyte) { Lisp_Object tem = build_string (adir); |