From 448b0275ae4d62b31f64e3c6399d4fb5a045315c Mon Sep 17 00:00:00 2001 From: Vincent Sanders Date: Fri, 16 Apr 2010 23:56:53 +0000 Subject: Fix file: handling on risc os, gtk, windows and framebuffer frontends svn path=/trunk/netsurf/; revision=10419 --- windows/findfile.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'windows/findfile.c') diff --git a/windows/findfile.c b/windows/findfile.c index c3e613d3a..f4f5e4557 100644 --- a/windows/findfile.c +++ b/windows/findfile.c @@ -38,10 +38,14 @@ static char *realpath(const char *path, char *resolved_path) char *path_to_url(const char *path) { - char *url = malloc(strlen(path) + FILE_SCHEME_PREFIX_LEN + 1); + char *url = malloc(strlen(path) + FILE_SCHEME_PREFIX_LEN + 3); char *sidx; strcpy(url, FILE_SCHEME_PREFIX); + if (*path == '/') { + /* unix style path start, so try wine Z: */ + strcat(url, "Z:"); + } strcat(url, path); sidx = strrchr(url, '\\'); -- cgit v1.2.3