aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPřemysl Eric Janouch <p@janouch.name>2021-11-22 12:41:53 +0100
committerPřemysl Eric Janouch <p@janouch.name>2021-11-22 12:42:26 +0100
commit97109b1e58a68ef3cb9b5f85d4ea8bb5a6ff8cd3 (patch)
tree9fbe2750f6a25285c56c4ddae8cb8cffa315470b
parenta719147bf3a276386d55790c86c332e19fe27d6f (diff)
downloadfiv-97109b1e58a68ef3cb9b5f85d4ea8bb5a6ff8cd3.tar.gz
fiv-97109b1e58a68ef3cb9b5f85d4ea8bb5a6ff8cd3.tar.xz
fiv-97109b1e58a68ef3cb9b5f85d4ea8bb5a6ff8cd3.zip
Fix browsing right after opening a file directly
-rw-r--r--fastiv.c3
1 files changed, 2 insertions, 1 deletions
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;