mirror of
https://git.pwmt.org/pwmt/zathura.git
synced 2024-12-28 08:36:01 +01:00
Revert parts of c3337bdd80
We still need a copy for the plugins. Signed-off-by: Sebastian Ramacher <sebastian+dev@ramacher.at>
This commit is contained in:
parent
c3337bdd80
commit
3d14894549
1 changed files with 6 additions and 12 deletions
|
@ -577,19 +577,13 @@ document_info_open(gpointer data)
|
||||||
file = g_file_get_path(gf);
|
file = g_file_get_path(gf);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
char* gf_file_path = g_file_get_path(gf);
|
/* copy file with GIO */
|
||||||
if (gf_file_path != NULL) {
|
file = prepare_document_open_from_gfile(document_info->zathura, gf);
|
||||||
/* file is not given via a native path, but available from a path */
|
if (file == NULL) {
|
||||||
file = gf_file_path;
|
girara_notify(document_info->zathura->ui.session, GIRARA_ERROR,
|
||||||
|
_("Could not read file from GIO and copy it to a temporary file."));
|
||||||
} else {
|
} else {
|
||||||
/* copy file with GIO */
|
document_info->zathura->stdin_support.file = g_strdup(file);
|
||||||
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);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
g_object_unref(gf);
|
g_object_unref(gf);
|
||||||
|
|
Loading…
Reference in a new issue