From 1dc97bc256ddd194031d2ce795fa3145bd8c43be Mon Sep 17 00:00:00 2001 From: Alastair Poole Date: Mon, 13 Jul 2020 13:09:08 +0100 Subject: [PATCH] config: Fix where home directory is a symlink. Without this, some features in ephoto break. To resolve user needs to remove the ephoto config so the correct value is used. --- src/bin/ephoto_config.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/bin/ephoto_config.c b/src/bin/ephoto_config.c index 057fbbb..5cd2c55 100644 --- a/src/bin/ephoto_config.c +++ b/src/bin/ephoto_config.c @@ -782,6 +782,7 @@ Eina_Bool ephoto_config_init(Ephoto *ephoto) { Eet_Data_Descriptor_Class eddc; + char *home; if (!eet_eina_stream_data_descriptor_class_set(&eddc, sizeof(eddc), "Ephoto_Config", sizeof(Ephoto_Config))) @@ -792,6 +793,7 @@ ephoto_config_init(Ephoto *ephoto) if (!edd) edd = eet_data_descriptor_stream_new(&eddc); + #undef T #undef D #define T Ephoto_Config @@ -830,7 +832,10 @@ ephoto_config_init(Ephoto *ephoto) ephoto->config->fsel_hide = 0; ephoto->config->left_size = .25; ephoto->config->right_size = .25; - ephoto->config->open = eina_stringshare_add(eina_environment_home_get()); + // Some systems use a symlink to the user's home directory (e.g. FreeBSD). + home = ecore_file_realpath(eina_environment_home_get()); + ephoto->config->open = eina_stringshare_add(home); + free(home); ephoto->config->prompts = 1; ephoto->config->drop = 0; ephoto->config->movess = 1;