From: Eli Zaretskii Date: Tue, 26 Feb 2002 18:42:25 +0000 (+0000) Subject: (Fsubstitute_in_file_name): Fix the change from 2002-02-08. X-Git-Tag: ttn-vms-21-2-B4~16453 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=b135bd4ced63d3e8dbcd94ba16c1ab6a5b243736;p=emacs.git (Fsubstitute_in_file_name): Fix the change from 2002-02-08. --- diff --git a/src/ChangeLog b/src/ChangeLog index fdeb0b359e6..1d6d087b665 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,8 @@ 2002-02-26 Eli Zaretskii + * fileio.c (Fsubstitute_in_file_name): Fix the change from + 2002-02-08. + * xselect.c (Qcompound_text_with_extensions): Renamed from Qcompound_text_no_extensions. (lisp_data_to_selection_data, syms_of_xselect): Use the new name. diff --git a/src/fileio.c b/src/fileio.c index 7a4362f413a..894189008d5 100644 --- a/src/fileio.c +++ b/src/fileio.c @@ -2069,7 +2069,7 @@ duplicates what `expand-file-name' does. */) && *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 @@ duplicates what `expand-file-name' does. */) /* 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;