From 25c328b179bbe4bb8ecbd920969b6ec8c626047f Mon Sep 17 00:00:00 2001 From: Wonki Kim Date: Sat, 24 Nov 2018 03:25:25 +0000 Subject: [PATCH] elm_config: replace ecore_file_mv with ecore_file_cp eio_monitor could miss what it is tracking on in case of calling ecore_file_mv on the tracked file. so that this patch replace move with copy. Reviewed-by: Cedric BAIL Differential Revision: https://phab.enlightenment.org/D7352 --- src/lib/elementary/elm_config.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/lib/elementary/elm_config.c b/src/lib/elementary/elm_config.c index f1f0fa2..68caeba 100644 --- a/src/lib/elementary/elm_config.c +++ b/src/lib/elementary/elm_config.c @@ -875,7 +875,8 @@ _elm_config_profile_derived_save(const char *profile, Elm_Config_Derived *derive eet_close(ef); if (ret) { - ecore_file_mv(buf, buf2); + ecore_file_cp(buf, buf2); + ecore_file_unlink(buf); } else { @@ -2332,7 +2333,7 @@ _elm_config_profile_save(const char *profile) goto err; } - ret = ecore_file_mv(buf2, buf); + ret = ecore_file_cp(buf2, buf); if (!ret) { ERR("Error saving Elementary's configuration profile file"); @@ -2451,7 +2452,7 @@ _elm_config_save_internal(Elm_Config *cfg, const char *profile, Elm_Config_Snpri goto err; } - ret = ecore_file_mv(buf2, buf); + ret = ecore_file_cp(buf2, buf); if (!ret) { ERR("Error saving Elementary's configuration file"); -- 2.7.4