aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/fileio.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/fileio.c b/src/fileio.c
index 6c74dccc2ee..563726d1265 100644
--- a/src/fileio.c
+++ b/src/fileio.c
@@ -847,7 +847,10 @@ 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 (length > 1 && newdir[length - 1] == '/') 850 /* Adding `length > 1 &&' makes ~ expand into / when homedir
851 is the root dir. People disagree about whether that is right.
852 Anyway, we can't take the risk of this change now. */
853 if (newdir[length - 1] == '/')
851 { 854 {
852 unsigned char *temp = (unsigned char *) alloca (length); 855 unsigned char *temp = (unsigned char *) alloca (length);
853 bcopy (newdir, temp, length - 1); 856 bcopy (newdir, temp, length - 1);