diff --git a/legacy/efreet/src/bin/efreet_desktop_cache_create.c b/legacy/efreet/src/bin/efreet_desktop_cache_create.c index 0484e36f91..28254e638b 100644 --- a/legacy/efreet/src/bin/efreet_desktop_cache_create.c +++ b/legacy/efreet/src/bin/efreet_desktop_cache_create.c @@ -460,9 +460,7 @@ main(int argc, char **argv) } /* cleanup */ - eet_sync(util_ef); eet_close(util_ef); - eet_sync(ef); eet_close(ef); /* unlink old cache files */ @@ -489,15 +487,18 @@ main(int argc, char **argv) } /* touch update file */ - /* TODO: We need to signal whether the cache was updated or not */ - snprintf(file, sizeof(file), "%s/efreet/desktop_data.update", efreet_cache_home_get()); - tmpfd = open(file, O_CREAT | O_WRONLY, S_IRUSR | S_IWUSR); - if (tmpfd >= 0) - { - efreet_fsetowner(tmpfd); - if (write(tmpfd, "a", 1) != 1) perror("write"); - close(tmpfd); - } + if (changed) + { + snprintf(file, sizeof(file), "%s/efreet/desktop_data.update", efreet_cache_home_get()); + tmpfd = open(file, O_CREAT | O_WRONLY, S_IRUSR | S_IWUSR); + if (tmpfd >= 0) + { + efreet_fsetowner(tmpfd); + if (write(tmpfd, "a", 1) != 1) perror("write"); + close(tmpfd); + } + } + EINA_LIST_FREE(scanned, dir) eina_stringshare_del(dir); eina_list_free(extra_dirs); diff --git a/legacy/efreet/src/bin/efreet_icon_cache_create.c b/legacy/efreet/src/bin/efreet_icon_cache_create.c index 80edf72105..10bfd6d26e 100644 --- a/legacy/efreet/src/bin/efreet_icon_cache_create.c +++ b/legacy/efreet/src/bin/efreet_icon_cache_create.c @@ -968,7 +968,6 @@ main(int argc, char **argv) icon_theme_free(theme); eet_data_write(icon_ef, efreet_version_edd(), EFREET_CACHE_VERSION, icon_version, 1); - eet_sync(icon_ef); eet_close(icon_ef); efreet_setowner(efreet_icon_cache_file(EFREET_CACHE_ICON_FALLBACK)); free(icon_version); @@ -977,20 +976,22 @@ main(int argc, char **argv) /* save data */ eet_data_write(theme_ef, efreet_version_edd(), EFREET_CACHE_VERSION, theme_version, 1); - eet_sync(theme_ef); eet_close(theme_ef); efreet_setowner(efreet_icon_theme_cache_file()); free(theme_version); /* touch update file */ - snprintf(file, sizeof(file), "%s/efreet/icon_data.update", efreet_cache_home_get()); - tmpfd = open(file, O_CREAT | O_WRONLY, S_IRUSR | S_IWUSR); - if (tmpfd >= 0) - { - efreet_fsetowner(tmpfd); - write(tmpfd, "a", 1); - close(tmpfd); - } + if (changed) + { + snprintf(file, sizeof(file), "%s/efreet/icon_data.update", efreet_cache_home_get()); + tmpfd = open(file, O_CREAT | O_WRONLY, S_IRUSR | S_IWUSR); + if (tmpfd >= 0) + { + efreet_fsetowner(tmpfd); + write(tmpfd, "a", 1); + close(tmpfd); + } + } on_error_efreet: efreet_shutdown();