summaryrefslogtreecommitdiff
path: root/windows/findfile.c
diff options
context:
space:
mode:
Diffstat (limited to 'windows/findfile.c')
-rw-r--r--windows/findfile.c6
1 files changed, 5 insertions, 1 deletions
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, '\\');