From 3d14894549fc69b2aca1455c95cc8c272a192153 Mon Sep 17 00:00:00 2001 From: Sebastian Ramacher Date: Sun, 6 Dec 2015 17:38:14 +0100 Subject: [PATCH] Revert parts of c3337bdd8098bd3840dc2863b5ce7a7b807835fe We still need a copy for the plugins. Signed-off-by: Sebastian Ramacher --- zathura/zathura.c | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) diff --git a/zathura/zathura.c b/zathura/zathura.c index bcf38c2..8ed568a 100644 --- a/zathura/zathura.c +++ b/zathura/zathura.c @@ -577,19 +577,13 @@ document_info_open(gpointer data) file = g_file_get_path(gf); } else { - char* gf_file_path = g_file_get_path(gf); - if (gf_file_path != NULL) { - /* file is not given via a native path, but available from a path */ - file = gf_file_path; + /* copy file with GIO */ + file = prepare_document_open_from_gfile(document_info->zathura, gf); + if (file == NULL) { + girara_notify(document_info->zathura->ui.session, GIRARA_ERROR, + _("Could not read file from GIO and copy it to a temporary file.")); } else { - /* copy file with GIO */ - file = prepare_document_open_from_gfile(document_info->zathura, gf); - if (file == NULL) { - girara_notify(document_info->zathura->ui.session, GIRARA_ERROR, - _("Could not read file from GIO and copy it to a temporary file.")); - } else { - document_info->zathura->stdin_support.file = g_strdup(file); - } + document_info->zathura->stdin_support.file = g_strdup(file); } } g_object_unref(gf);