From 97109b1e58a68ef3cb9b5f85d4ea8bb5a6ff8cd3 Mon Sep 17 00:00:00 2001 From: Přemysl Eric Janouch Date: Mon, 22 Nov 2021 12:41:53 +0100 Subject: Fix browsing right after opening a file directly --- fastiv.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/fastiv.c b/fastiv.c index 00afe42..ec40a85 100644 --- a/fastiv.c +++ b/fastiv.c @@ -208,7 +208,8 @@ open(const gchar *path) // So that load_directory() itself can be used for reloading. gchar *dirname = g_path_get_dirname(path); - if (!g.directory || strcmp(dirname, g.directory)) { + if (!g.files->len /* hack to always load the directory after launch */ || + !g.directory || strcmp(dirname, g.directory)) { load_directory(dirname); } else { g.files_index = -1; -- cgit v1.2.3-70-g09d2