Mercurial > emacs
changeset 43564:1874239cb5be
(Fsubstitute_in_file_name): Fix the change from 2002-02-08.
author | Eli Zaretskii <eliz@gnu.org> |
---|---|
date | Tue, 26 Feb 2002 18:41:36 +0000 |
parents | 1440b9054cb4 |
children | a1e814fb811e |
files | src/fileio.c |
diffstat | 1 files changed, 2 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/src/fileio.c Tue Feb 26 16:51:30 2002 +0000 +++ b/src/fileio.c Tue Feb 26 18:41:36 2002 +0000 @@ -2069,7 +2069,7 @@ && *s != ':' #endif /* VMS */ ); s++); - if (s > p + 1) + if (p[0] == '~' && s > p + 1) /* we've got "/~something/" */ { o = (unsigned char *) alloca (s - p + 1); bcopy ((char *) p, o, s - p); @@ -2080,7 +2080,7 @@ /* If we have ~/ or ~user and `user' exists, discard everything up to ~. But if `user' does not exist, leave ~user alone, it might be a literal file name. */ - if (s == p + 1 || pw) + if (IS_DIRECTORY_SEP (p[0]) || s == p + 1 || pw) { nm = p; substituted = 1;