[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
LYNX-DEV Can't read local file which includes '%xx' in path.
From: |
Nokubi Takatsugu |
Subject: |
LYNX-DEV Can't read local file which includes '%xx' in path. |
Date: |
Wed, 30 Apr 1997 15:25:29 +0900 |
Lynx can't read local file which includes '%xx' in path like
'/home/who/wwwdata/somehost/%7Euser/index.html'.
Because lynx simply adds 'file:///absolute-path/' to argument as a
local file or directory and attempts to access by that URL.
I made an ad hoc patch. That is below.
Would you like to fix this bug in next release?
-----
*** LYUtils.c Wed Apr 23 10:02:32 1997
--- LYUtils.c.new Wed Apr 23 09:59:52 1997
***************
*** 2335,2340 ****
--- 2335,2359 ----
* residual relative elements, and append it. - FM
*/
StrAllocCopy(temp, old_string);
+ {
+ char *temp2, *tptr = temp, *ploc;
+ temp2 = (char *)malloc(1);
+ *temp2 = '\0';
+ for (;;) {
+ ploc = strchr(tptr, '%');
+ if (ploc != NULL) {
+ *ploc = '\0';
+ StrAllocCat(temp2, tptr);
+ StrAllocCat(temp2, "%25");
+ tptr = ploc + 1;
+ } else {
+ StrAllocCat(temp2, tptr);
+ break;
+ }
+ }
+ FREE(temp);
+ temp = temp2;
+ }
LYTrimRelFromAbsPath(temp);
StrAllocCat(*AllocatedString, temp);
FREE(temp);
--
Nokubi Takatsugu
E-mail: address@hidden / address@hidden
;
; To UNSUBSCRIBE: Send a mail message to address@hidden
; with "unsubscribe lynx-dev" (without the
; quotation marks) on a line by itself.
;
- LYNX-DEV Can't read local file which includes '%xx' in path.,
Nokubi Takatsugu <=