Commit f1cc678f authored by Roland McGrath's avatar Roland McGrath
Browse files

(Fexpand_file_name): Don't remove trailing / from NEWDIR if just "/".

parent d74e816f
/* File IO for GNU Emacs.
Copyright (C) 1985, 1986, 1987, 1988, 1992 Free Software Foundation, Inc.
Copyright (C) 1985, 1986, 1987, 1988, 1992, 1993 Free Software Foundation, Inc.
This file is part of GNU Emacs.
......@@ -847,7 +847,7 @@ See also the function `substitute-in-file-name'.")
{
/* Get rid of any slash at the end of newdir. */
int length = strlen (newdir);
if (newdir[length - 1] == '/')
if (length > 1 && newdir[length - 1] == '/')
{
unsigned char *temp = (unsigned char *) alloca (length);
bcopy (newdir, temp, length - 1);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment