[Added]
- An external user-supplied program can be called for the current URI
or for hyperlinks/images/videos/audio files.
+ - Lariza will now automatically add a "file://" prefix for local
+ files.
v16.12 2016-12-24
[Fixed]
+#include <limits.h>
#include <stdio.h>
#include <stdlib.h>
#include <sys/types.h>
gchar *
ensure_uri_scheme(const gchar *t)
{
- gchar *f;
+ gchar *f, *fabs;
f = g_ascii_strdown(t, -1);
if (!g_str_has_prefix(f, "http:") &&
!g_str_has_prefix(f, "about:"))
{
g_free(f);
- f = g_strdup_printf("http://%s", t);
+ fabs = realpath(t, NULL);
+ if (fabs != NULL)
+ {
+ f = g_strdup_printf("file://%s", fabs);
+ free(fabs);
+ }
+ else
+ f = g_strdup_printf("http://%s", t);
return f;
}
else