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.
This commit is contained in:
parent
44e89e7c6a
commit
1dc97bc256
|
@ -782,6 +782,7 @@ Eina_Bool
|
||||||
ephoto_config_init(Ephoto *ephoto)
|
ephoto_config_init(Ephoto *ephoto)
|
||||||
{
|
{
|
||||||
Eet_Data_Descriptor_Class eddc;
|
Eet_Data_Descriptor_Class eddc;
|
||||||
|
char *home;
|
||||||
|
|
||||||
if (!eet_eina_stream_data_descriptor_class_set(&eddc, sizeof(eddc),
|
if (!eet_eina_stream_data_descriptor_class_set(&eddc, sizeof(eddc),
|
||||||
"Ephoto_Config", sizeof(Ephoto_Config)))
|
"Ephoto_Config", sizeof(Ephoto_Config)))
|
||||||
|
@ -792,6 +793,7 @@ ephoto_config_init(Ephoto *ephoto)
|
||||||
if (!edd)
|
if (!edd)
|
||||||
edd = eet_data_descriptor_stream_new(&eddc);
|
edd = eet_data_descriptor_stream_new(&eddc);
|
||||||
|
|
||||||
|
|
||||||
#undef T
|
#undef T
|
||||||
#undef D
|
#undef D
|
||||||
#define T Ephoto_Config
|
#define T Ephoto_Config
|
||||||
|
@ -830,7 +832,10 @@ ephoto_config_init(Ephoto *ephoto)
|
||||||
ephoto->config->fsel_hide = 0;
|
ephoto->config->fsel_hide = 0;
|
||||||
ephoto->config->left_size = .25;
|
ephoto->config->left_size = .25;
|
||||||
ephoto->config->right_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->prompts = 1;
|
||||||
ephoto->config->drop = 0;
|
ephoto->config->drop = 0;
|
||||||
ephoto->config->movess = 1;
|
ephoto->config->movess = 1;
|
||||||
|
|
Loading…
Reference in New Issue