stefan pushed a commit to branch master.

http://git.enlightenment.org/core/elementary.git/commit/?id=9ef32f1b59df32ec3c45e753f076c589920fe386

commit 9ef32f1b59df32ec3c45e753f076c589920fe386
Author: Stefan Schmidt <ste...@osg.samsung.com>
Date:   Thu Jan 14 14:22:23 2016 +0100

    elm_config: handle eet_data_write possible error return
    
    CID: 1347399
---
 src/lib/elm_config.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/src/lib/elm_config.c b/src/lib/elm_config.c
index 4fc2f3b..647679d 100644
--- a/src/lib/elm_config.c
+++ b/src/lib/elm_config.c
@@ -767,6 +767,7 @@ _elm_config_profile_derived_save(const char *profile, 
Elm_Config_Derived *derive
 {
    Eet_File *ef;
    char buf[PATH_MAX], buf2[PATH_MAX];
+   int ret;
 
    _elm_config_user_dir_snprintf(buf, sizeof(buf), "config/%s",
                                  profile ? profile : _elm_profile);
@@ -778,9 +779,9 @@ _elm_config_profile_derived_save(const char *profile, 
Elm_Config_Derived *derive
    ef = eet_open(buf, EET_FILE_MODE_WRITE);
    if (ef)
      {
-        eet_data_write(ef, _config_derived_edd, "config", derived, 1);
+        ret = eet_data_write(ef, _config_derived_edd, "config", derived, 1);
         eet_close(ef);
-        ecore_file_mv(buf, buf2);
+        if (ret) ecore_file_mv(buf, buf2);
      }
 }
 

-- 


Reply via email to