Commit b135bd4c authored by Eli Zaretskii's avatar Eli Zaretskii
Browse files

(Fsubstitute_in_file_name): Fix the change from 2002-02-08.

parent 16425473
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.
......
......@@ -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;
......
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