summaryrefslogtreecommitdiff
path: root/src/lib/eolian/eolian_database.c
diff options
context:
space:
mode:
authorDaniel Kolesa <d.kolesa@osg.samsung.com>2015-05-27 14:32:03 +0100
committerDaniel Kolesa <d.kolesa@osg.samsung.com>2015-05-27 14:32:24 +0100
commit742d7c394ca99587fbe01fb0da5fd744c7ffbaee (patch)
tree9d0f19b1b0b96acf05b16529de145bc08e5af1a7 /src/lib/eolian/eolian_database.c
parentcc49c1702b64152144a1fc6534ba9de71a61d4ba (diff)
eolian: allow a filename (rather than path) to be given to eolian_file_parse
Diffstat (limited to '')
-rw-r--r--src/lib/eolian/eolian_database.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/lib/eolian/eolian_database.c b/src/lib/eolian/eolian_database.c
index 94f6a9d1f1..31a6d869e1 100644
--- a/src/lib/eolian/eolian_database.c
+++ b/src/lib/eolian/eolian_database.c
@@ -209,6 +209,7 @@ EAPI Eina_Bool
209eolian_file_parse(const char *filepath) 209eolian_file_parse(const char *filepath)
210{ 210{
211 Eina_Bool is_eo; 211 Eina_Bool is_eo;
212 const char *eopath;
212 if (_database_init_count <= 0) 213 if (_database_init_count <= 0)
213 return EINA_FALSE; 214 return EINA_FALSE;
214 is_eo = eina_str_has_suffix(filepath, EO_SUFFIX); 215 is_eo = eina_str_has_suffix(filepath, EO_SUFFIX);
@@ -217,7 +218,9 @@ eolian_file_parse(const char *filepath)
217 fprintf(stderr, "eolian: file '%s' doesn't have a correct extension\n", filepath); 218 fprintf(stderr, "eolian: file '%s' doesn't have a correct extension\n", filepath);
218 return EINA_FALSE; 219 return EINA_FALSE;
219 } 220 }
220 return eo_parser_database_fill(filepath, !is_eo); 221 if (!(eopath = eina_hash_find(is_eo ? _filenames : _tfilenames, filepath)))
222 eopath = filepath;
223 return eo_parser_database_fill(eopath, !is_eo);
221} 224}
222 225
223static Eina_Bool _tfile_parse(const Eina_Hash *hash EINA_UNUSED, const void *key EINA_UNUSED, void *data, void *fdata) 226static Eina_Bool _tfile_parse(const Eina_Hash *hash EINA_UNUSED, const void *key EINA_UNUSED, void *data, void *fdata)