bu5hm4n pushed a commit to branch master. http://git.enlightenment.org/apps/extra.git/commit/?id=524fd6169b4929181b2c65cfc39f362d79a1748e
commit 524fd6169b4929181b2c65cfc39f362d79a1748e Author: Marcel Hollerbach <[email protected]> Date: Mon Jan 9 21:23:20 2017 +0100 extra: add a few things in the one line was a missing ";" The lib is now also checking that the extra directory really exists before writing files there. And the cache file is created in any way. --- src/bin/extra_main.c | 2 +- src/lib/extra.c | 13 ++++++++++++- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/src/bin/extra_main.c b/src/bin/extra_main.c index 6f622c2..90792bd 100644 --- a/src/bin/extra_main.c +++ b/src/bin/extra_main.c @@ -464,7 +464,7 @@ elm_main(int argc EINA_UNUSED, char **argv EINA_UNUSED) goto end; if (skip_option) - _extra_win_sync_done_cb() + _extra_win_sync_done_cb(); else extra_win_sync(); diff --git a/src/lib/extra.c b/src/lib/extra.c index 6dd1369..b3dd697 100644 --- a/src/lib/extra.c +++ b/src/lib/extra.c @@ -52,6 +52,17 @@ extra_init(void) goto shutdown_eina; } + //we are putting stuff into <cachedir>/extra/ lets make sure its created + { + Eina_Strbuf *buf; + + buf = eina_strbuf_new(); + eina_strbuf_append(buf, efreet_cache_home_get()); + eina_strbuf_append(buf, "/extra/"); + ecore_file_mkdir(eina_strbuf_string_get(buf)); + eina_strbuf_free(buf); + } + // Put here your initialization logic of your library _extra_theme_cache_load(); @@ -236,7 +247,7 @@ _url_complete_cb(void *data, int type EINA_UNUSED, void *event_info) char *cache_path = _theme_cache_path_get(); const char *content = eina_strbuf_string_get(buf); - cache = fopen(cache_path, "w"); + cache = fopen(cache_path, "w+"); fprintf(cache, "%s", content); fclose(cache); free(cache_path); --
