From: Wonki Kim Date: Mon, 21 Oct 2019 11:10:02 +0000 (+0900) Subject: elm_config: replace ecore_file_cp with ecore_file_mv X-Git-Tag: submit/tizen/20191021.124352^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F52%2F216152%2F1;p=platform%2Fupstream%2Fefl.git elm_config: replace ecore_file_cp with ecore_file_mv ecore_file_cp can cause elm_config eet data invalid. this patch replaces it with ecore_file_mv to prevent the problem. Change-Id: I5e39ab88cf5ecb70e9d9823b43ebdcc92b2cfc51 Signed-off-by: Wonki Kim --- diff --git a/src/lib/elementary/elm_config.c b/src/lib/elementary/elm_config.c index ac7b86b..4f0eb68 100644 --- a/src/lib/elementary/elm_config.c +++ b/src/lib/elementary/elm_config.c @@ -907,9 +907,11 @@ _elm_config_profile_derived_save(const char *profile, Elm_Config_Derived *derive eet_close(ef); if (ret) { - if (!ecore_file_cp(buf, buf2)) - ERR("Error saving Elementary's derived configuration profile file"); - ecore_file_unlink(buf); + if (!ecore_file_mv(buf, buf2)) + { + ERR("Error saving Elementary's derived configuration profile file"); + ecore_file_unlink(buf); + } } else { @@ -2405,15 +2407,13 @@ _elm_config_profile_save(const char *profile) goto err; } - ret = ecore_file_cp(buf2, buf); + ret = ecore_file_mv(buf2, buf); if (!ret) { ERR("Error saving Elementary's configuration profile file"); goto err; } - ecore_file_unlink(buf2); - derived = _elm_config_derived_load(profile ? profile : _elm_profile); if (derived) { @@ -2524,14 +2524,13 @@ _elm_config_save_internal(Elm_Config *cfg, const char *profile, Elm_Config_Snpri goto err; } - ret = ecore_file_cp(buf2, buf); + ret = ecore_file_mv(buf2, buf); if (!ret) { ERR("Error saving Elementary's configuration file"); goto err; } - ecore_file_unlink(buf2); return EINA_TRUE; err: