]> code.delx.au - gnu-emacs/commitdiff
(Fsubstitute_in_file_name): Fix the change from 2002-02-08.
authorEli Zaretskii <eliz@gnu.org>
Tue, 26 Feb 2002 18:42:25 +0000 (18:42 +0000)
committerEli Zaretskii <eliz@gnu.org>
Tue, 26 Feb 2002 18:42:25 +0000 (18:42 +0000)
src/ChangeLog
src/fileio.c

index fdeb0b359e6c8fdcdb7fe2e74a973e8a09931b3a..1d6d087b6650b1b9d620bb2ef3f450cd26eb909b 100644 (file)
@@ -1,5 +1,8 @@
 2002-02-26  Eli Zaretskii  <eliz@is.elta.co.il>
 
+       * 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.
index 7a4362f413a12aff156e7dba0f9bed74f729fa5b..894189008d52b19895f0e3585a9913387a7ecc7e 100644 (file)
@@ -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;