changeset 2591:a53b4a566cb6

(Fexpand_file_name): Don't remove trailing / from NEWDIR if just "/".
author Roland McGrath <roland@gnu.org>
date Mon, 26 Apr 1993 21:54:00 +0000
parents 9dace03bd76c
children 2e57e16282f0
files src/fileio.c
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/fileio.c	Mon Apr 26 19:21:01 1993 +0000
+++ b/src/fileio.c	Mon Apr 26 21:54:00 1993 +0000
@@ -1,5 +1,5 @@
 /* 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 @@
     {
       /* 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);