rimmed pushed a commit to branch master.

http://git.enlightenment.org/tools/eflete.git/commit/?id=13e6439dd756fbd7f661c5383002070ebb29e07c

commit 13e6439dd756fbd7f661c5383002070ebb29e07c
Author: Andrii Kroitor <an.kroi...@samsung.com>
Date:   Wed Apr 20 14:42:33 2016 +0300

    config: raise priority of EFLETE_PROJECTS_DIR environment variable
---
 src/bin/config/config.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/bin/config/config.c b/src/bin/config/config.c
index 5d6e067..db2679d 100644
--- a/src/bin/config/config.c
+++ b/src/bin/config/config.c
@@ -299,12 +299,12 @@ _profile_update(Profile *prof)
 
    char *env_path = getenv("EFLETE_PROJECTS_DIR");
    prof->version                             = PROFILE_VERSION;
-   if ((!env_path) || (!ecore_file_exists(env_path)))
-     env_path = getenv("HOME");
 
-   if ((!prof->general.projects_folder) ||
+   if ((env_path) && (ecore_file_exists(env_path)))
+     prof->general.projects_folder = strdup(env_path);
+   else if ((!prof->general.projects_folder) ||
        (!ecore_file_exists(prof->general.projects_folder)))
-     prof->general.projects_folder  = strdup(env_path);
+     prof->general.projects_folder = getenv("HOME");
 
    if (!prof->shortcuts)
      prof->shortcuts                         = _default_shortcuts_get();

-- 


Reply via email to