lynx-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: lynx-dev Improper ~/ expansion in file://


From: Ryan Hung
Subject: Re: lynx-dev Improper ~/ expansion in file://
Date: Sun, 13 Dec 1998 22:18:52 -0800 (PST)

On Sun, 22 Nov 1998, Klaus Weide wrote:
> This change (untested) should prevent generation of the duplicate
> slash from /~ in file URL, but doesn't do anything about the other
> problems.   
> 
> When /~ appears in something in "file syntax", i.e. a file without
> "file:", it is normally handled in LYConvertToURL() in LYUtils.c
> which doesn't introduce a double slash.
> 
>      Klaus
> 
> --- lynx2-8-1-orig/src/LYGetFile.c    Wed Oct 14 07:23:56 1998
> +++ lynx2-8-1/src/LYGetFile.c Sun Nov 22 16:24:13 1998
> @@ -605,8 +605,10 @@
>                           *cp1 = '\0';
>                           cp1 += 2;
>                           StrAllocCopy(temp, doc->address);
> -                         LYAddHtmlSep(&temp);
> -                         StrAllocCat(temp, wwwName(Home_Dir()));
> +                         StrAllocCopy(cp, wwwName(Home_Dir()));
> +                         if (!LYIsHtmlSep(cp))
> +                             LYAddHtmlSep(&temp);
> +                         StrAllocCat(temp, cp);
>                           if ((cp2 = strchr(cp1, '/')) != NULL) {
>                               LYTrimRelFromAbsPath(cp2);
>                               StrAllocCat(temp, cp2);

Ok, I finally figured out your code here, Klaus.  As I mentioned, it
doesn't work directly, but if one just completely removes the line
"LYAddHtmlSep(&temp);" in the original code (any version from 2.8.1.rel.2
to 2.8.2.dev.8), it completely fixes the problem with the prepended "//"
in the "/~" expansion.  Of course, I don't know whether this also produces
any more problems...

                                                        Ryan.

_/  \__/  \__/  \__/  \__/  \__/  \__/  \__/address@hidden/  \__/  \__/
 \_Apoptosis=programmed cell death/  \__/  address@hidden/  \__
_/ --you can't live without it!/  \__/  \http://www.vcn.bc.ca/people/rhung
 \__/  \__/  \__/  \__/  \__/  \__/  \__/  \My words Copyright (C) 1998  \__


reply via email to

[Prev in Thread] Current Thread [Next in Thread]