aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorRoland McGrath1993-04-26 21:54:00 +0000
committerRoland McGrath1993-04-26 21:54:00 +0000
commitf1cc678fdca621df8eb39f65054195388a0bca94 (patch)
tree9ee3a967abe03084d7fa86186f4963e360096895 /src
parentd74e816f0467ca0c37bbee5acfffdf9d347768c6 (diff)
downloademacs-f1cc678fdca621df8eb39f65054195388a0bca94.tar.gz
emacs-f1cc678fdca621df8eb39f65054195388a0bca94.zip
(Fexpand_file_name): Don't remove trailing / from NEWDIR if just "/".
Diffstat (limited to 'src')
-rw-r--r--src/fileio.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/fileio.c b/src/fileio.c
index 05cc4677b64..6c74dccc2ee 100644
--- a/src/fileio.c
+++ b/src/fileio.c
@@ -1,5 +1,5 @@
1/* File IO for GNU Emacs. 1/* File IO for GNU Emacs.
2 Copyright (C) 1985, 1986, 1987, 1988, 1992 Free Software Foundation, Inc. 2 Copyright (C) 1985, 1986, 1987, 1988, 1992, 1993 Free Software Foundation, Inc.
3 3
4This file is part of GNU Emacs. 4This file is part of GNU Emacs.
5 5
@@ -847,7 +847,7 @@ See also the function `substitute-in-file-name'.")
847 { 847 {
848 /* Get rid of any slash at the end of newdir. */ 848 /* Get rid of any slash at the end of newdir. */
849 int length = strlen (newdir); 849 int length = strlen (newdir);
850 if (newdir[length - 1] == '/') 850 if (length > 1 && newdir[length - 1] == '/')
851 { 851 {
852 unsigned char *temp = (unsigned char *) alloca (length); 852 unsigned char *temp = (unsigned char *) alloca (length);
853 bcopy (newdir, temp, length - 1); 853 bcopy (newdir, temp, length - 1);