From bd0f98f3f52c7c9f3e4e22609ece0ffe4f9dd3c6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Enrico=20Tr=C3=B6ger?= Date: Sun, 16 Aug 2009 17:27:01 +0000 Subject: [PATCH] Fix opening of local files in the browser on Windows. git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@4098 ea778897-0a13-0410-b9d1-a72fbfd435f5 --- ChangeLog | 2 ++ src/win32.c | 5 ++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 7b6b8720..71d37764 100644 --- a/ChangeLog +++ b/ChangeLog @@ -4,6 +4,8 @@ Add a translation hint to an ambiguous format string. * src/Makefile.am: Add missing include path to fix 'make distcheck'. + * src/win32.c: + Fix opening of local files in the browser on Windows. * New release: Geany 0.18 "Kaine". diff --git a/src/win32.c b/src/win32.c index 2f7bb727..5c460d85 100644 --- a/src/win32.c +++ b/src/win32.c @@ -644,8 +644,11 @@ gint win32_message_dialog_unsaved(const gchar *msg) void win32_open_browser(const gchar *uri) { if (strncmp(uri, "file://", 7) == 0) + { uri += 7; - + while (*uri == '/') + uri++; + } ShellExecute(NULL, "open", uri, NULL, NULL, SW_SHOWNORMAL); }