aboutsummaryrefslogtreecommitdiffstats
path: root/url.c
diff options
context:
space:
mode:
authorFumitoshi UKAI <ukai@debian.or.jp>2003-12-08 16:17:19 +0000
committerFumitoshi UKAI <ukai@debian.or.jp>2003-12-08 16:17:19 +0000
commit5b0442e8878021dcd33a51e44ab7b04f2392bea8 (patch)
tree12a30d1a419c9456f971d69ad0b64ac69afe2838 /url.c
parent[w3m-dev 04022] $^ (diff)
downloadw3m-5b0442e8878021dcd33a51e44ab7b04f2392bea8.tar.gz
w3m-5b0442e8878021dcd33a51e44ab7b04f2392bea8.zip
[w3m-dev 04024] fix: drive letter
* url.c (parseURL2): fix for SUPPORT_DOS_DRIVE_PREFIX From: WATANABE Katsuyuki <knabe@sannet.ne.jp>
Diffstat (limited to '')
-rw-r--r--url.c17
1 files changed, 14 insertions, 3 deletions
diff --git a/url.c b/url.c
index 48ece16..f3888be 100644
--- a/url.c
+++ b/url.c
@@ -1,4 +1,4 @@
-/* $Id: url.c,v 1.86 2003/10/22 18:48:09 ukai Exp $ */
+/* $Id: url.c,v 1.87 2003/12/08 16:17:21 ukai Exp $ */
#include "fm.h"
#include <sys/types.h>
#include <sys/socket.h>
@@ -1001,8 +1001,19 @@ parseURL2(char *url, ParsedURL *pu, ParsedURL *current)
}
return;
}
- if (pu->scheme == SCM_LOCAL)
- pu->file = file_quote(expandName(file_unquote(pu->file)));
+ if (pu->scheme == SCM_LOCAL) {
+ char *q = expandName(file_unquote(pu->file));
+#ifdef SUPPORT_DOS_DRIVE_PREFIX
+ Str drive;
+ if (IS_ALPHA(q[0]) && q[1] == ':') {
+ drive = Strnew_charp_n(q, 2);
+ Strcat_charp(drive, file_quote(q+2));
+ pu->file = drive->ptr;
+ }
+ else
+#endif
+ pu->file = file_quote(q);
+ }
if (current && (pu->scheme == current->scheme ||
(pu->scheme == SCM_FTP && current->scheme == SCM_FTPDIR) ||