3af2e9
From 9756fdca2efe71738d02792e839862cb5f0a0244 Mon Sep 17 00:00:00 2001
3af2e9
From: Marek Kasik <mkasik@redhat.com>
3af2e9
Date: Tue, 16 Feb 2021 17:15:20 +0100
3af2e9
Subject: [PATCH] window: Use tmp dir as containing folder for non-native file
3af2e9
3af2e9
Show the temporary directory containing the downloaded document
3af2e9
as containing folder for documents from remote URIs.
3af2e9
3af2e9
It fails currently since it can not open remote URIs.
3af2e9
---
3af2e9
 shell/ev-window.c | 4 ++++
3af2e9
 1 file changed, 4 insertions(+)
3af2e9
3af2e9
diff --git a/shell/ev-window.c b/shell/ev-window.c
3af2e9
index ba282e18..a1bc55f0 100644
3af2e9
--- a/shell/ev-window.c
3af2e9
+++ b/shell/ev-window.c
3af2e9
@@ -3290,6 +3290,10 @@ ev_window_cmd_open_containing_folder (GSimpleAction *action,
3af2e9
 	}
3af2e9
 
3af2e9
 	file = g_file_new_for_uri (window->priv->uri);
3af2e9
+	if (!g_file_is_native (file)) {
3af2e9
+		g_object_unref (file);
3af2e9
+		file = g_file_new_for_uri (ev_document_get_uri (window->priv->document));
3af2e9
+	}
3af2e9
 	list.next = list.prev = NULL;
3af2e9
 	list.data = file;
3af2e9
 
3af2e9
-- 
3af2e9
2.30.2
3af2e9