elm_config: replace ecore_file_mv with ecore_file_cp
authorWonki Kim <wonki_.kim@samsung.com>
Sat, 24 Nov 2018 03:25:25 +0000 (03:25 +0000)
committerHermet Park <hermetpark@gmail.com>
Wed, 5 Dec 2018 05:50:10 +0000 (14:50 +0900)
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 <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D7352

src/lib/elementary/elm_config.c

index f1f0fa2..68caeba 100644 (file)
@@ -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");