Re: [dev] [surf] view local file

From: Eon S. Jeon <esjeon_AT_hyunmu.am>
Date: Tue, 10 Dec 2013 12:35:58 -0500

On Tue, 10 Dec 2013 17:30:10 +0100
Markus Teich <markus.teich_AT_stusta.mhn.de> wrote:

> Heyho,
>
> this morning I wondered how to open a file from the filesystem in
> surf, but neither "file://" nor "file:///" did work. Is it even
> possible? Thanks.
>
> --Markus
>

Hello

loaduri function in surf includes the following lines:

    /* In case it's a file path. */
    if(stat(uri, &st) == 0) {
        rp = realpath(uri, NULL);
        u = g_strdup_printf("file://%s", rp);
        free(rp);
    }

That is, you can just throw in a relative file path into surf without
"file:" protocol prefix.

Sincerely
Eon
Received on Tue Dec 10 2013 - 18:35:58 CET

This archive was generated by hypermail 2.3.0 : Tue Dec 10 2013 - 18:48:03 CET