summaryrefslogtreecommitdiff
path: root/src/lib/eolian/eolian_database.c
diff options
context:
space:
mode:
authorDaniel Zaoui <daniel.zaoui@yahoo.com>2015-02-11 16:58:53 +0200
committerDaniel Zaoui <daniel.zaoui@yahoo.com>2015-02-12 15:58:50 +0200
commit2349e1ac41345ba73c2a2a1a0d8435114ba613ef (patch)
treea5aaabd346fc710fec4c8fc531fd03e029df4810 /src/lib/eolian/eolian_database.c
parent7415a5fc3643e16589867a8b496835afaa09f016 (diff)
downloadefl-2349e1ac41345ba73c2a2a1a0d8435114ba613ef.tar.gz
Eolian: store the class filenames with the extensions.
This change is needed to give Espion a way to request the parsing of a class when a eo_add happens and the class is not known by Eolian.
Diffstat (limited to 'src/lib/eolian/eolian_database.c')
-rw-r--r--src/lib/eolian/eolian_database.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/lib/eolian/eolian_database.c b/src/lib/eolian/eolian_database.c
index b8ed8b55be..f1f6067a98 100644
--- a/src/lib/eolian/eolian_database.c
+++ b/src/lib/eolian/eolian_database.c
@@ -120,12 +120,10 @@ join_path(const char *path, const char *file)
static void
_scan_cb(const char *name, const char *path, void *data EINA_UNUSED)
{
- size_t len;
Eina_Bool is_eo = eina_str_has_suffix(name, EO_SUFFIX);
if (!is_eo && !eina_str_has_suffix(name, EOT_SUFFIX)) return;
- len = strlen(name) - (is_eo ? sizeof(EO_SUFFIX) : sizeof(EOT_SUFFIX)) + 1;
eina_hash_add(is_eo ? _filenames : _tfilenames,
- eina_stringshare_add_length(name, len), join_path(path, name));
+ eina_stringshare_add(name), join_path(path, name));
}
EAPI Eina_Bool
@@ -155,6 +153,7 @@ database_class_to_filename(const char *cname)
Eina_Strbuf *strbuf = eina_strbuf_new();
eina_strbuf_append(strbuf, cname);
eina_strbuf_replace_all(strbuf, ".", "_");
+ eina_strbuf_append(strbuf, ".eo");
ret = eina_strbuf_string_steal(strbuf);
eina_strbuf_free(strbuf);