about summary refs log tree commit diff stats
path: root/src/LYMainLoop.c
diff options
context:
space:
mode:
authorThomas E. Dickey <dickey@invisible-island.net>1998-09-17 12:13:52 -0400
committerThomas E. Dickey <dickey@invisible-island.net>1998-09-17 12:13:52 -0400
commit03b222bbbdbc58cbe5a4eb93e500d490800dee9c (patch)
tree317783cc00147ee45e2cadfa578b6e468581343c /src/LYMainLoop.c
parent02f2851492143446abaaa33cc9536fade7b51124 (diff)
downloadlynx-snapshots-03b222bbbdbc58cbe5a4eb93e500d490800dee9c.tar.gz
snapshot of project "lynx", label v2-8-1dev_28
Diffstat (limited to 'src/LYMainLoop.c')
-rw-r--r--src/LYMainLoop.c24
1 files changed, 6 insertions, 18 deletions
diff --git a/src/LYMainLoop.c b/src/LYMainLoop.c
index bba831b3..23d2de7a 100644
--- a/src/LYMainLoop.c
+++ b/src/LYMainLoop.c
@@ -4214,22 +4214,15 @@ check_goto_URL:
 		if (nlinks > 0) {
 		    cp = links[curdoc.link].lname;
 		    if (is_url(cp) == FILE_URL_TYPE) {
-			if (!strncmp(cp, "file://localhost", 16)) {
-			    /*
-			     *	This is the only case that should occur. - kw
-			     */
-			    StrAllocCopy(tp, cp + 16);
-			} else if (!strncmp(cp, "file:", 5)) {
-			    StrAllocCopy(tp, cp + 5);
-			} else {
-			    StrAllocCopy(tp, cp);
-			}
-			HTUnEscape(tp);
+			cp = HTfullURL_toFile(cp);
+			StrAllocCopy(tp, cp);
+			free(cp);
+
 			if (stat(tp, &dir_info) == -1) {
 			    HTAlert(NO_STATUS);
 			} else {
 			    if (S_ISREG(dir_info.st_mode)) {
-				StrAllocCopy(tp, cp);
+				StrAllocCopy(tp, links[curdoc.link].lname);
 				HTUnEscapeSome(tp, "/");
 				if (edit_current_file(tp,
 						      curdoc.link, Newline)) {
@@ -5134,12 +5127,7 @@ check_add_bookmark_to_self:
 	    if (!LYReopenTracelog(&trace_mode_flag))
 		break;
 
-	    StrAllocCopy(newdoc.address, "file://localhost");
-#ifdef VMS
-	    StrAllocCat(newdoc.address, HTVMS_wwwName(LYTraceLogPath));
-#else
-	    StrAllocCat(newdoc.address, LYTraceLogPath);
-#endif /* VMS */
+	    LYLocalFileToURL (&(newdoc.address), LYTraceLogPath);
 	    StrAllocCopy(newdoc.title, LYNX_TRACELOG_TITLE);
 	    FREE(newdoc.post_data);
 	    FREE(newdoc.post_content_type);