Summary Files Commits Branches @commit @diff @stats
diff options
context:
space:
mode:
1 files changed, 1 insertions, 13 deletions
-rw-r--r--badwolf.c14
diff --git a/badwolf.c b/badwolf.c
index 866a4ba..fc26407 100644
--- a/badwolf.c
+++ b/badwolf.c
@@ -81,19 +81,7 @@ badwolf_ensure_uri_scheme(gchar *text, gboolean try_file)
soup_uri_free(uri);
- if(try_file)
- {
- gchar *f;
- char *path;
- path = realpath(text, NULL);
-
- if(path != NULL)
- {
- f = g_strdup_printf("file://%s", path);
- free(path);
- return f;
- }
- }
+ if(try_file && (access(text, R_OK) == 0)) return g_strdup_printf("file://%s", text);
return g_strdup_printf("http://%s", text);
}