nikawhite pushed a commit to branch master.

http://git.enlightenment.org/tools/eflete.git/commit/?id=b3d52db5bb294a5560beb8cdd296fa0e30acb445

commit b3d52db5bb294a5560beb8cdd296fa0e30acb445
Author: Mykyta Biliavskyi <m.biliavs...@samsung.com>
Date:   Wed Aug 10 12:29:26 2016 +0300

    Project export: check extension of exported file.
    
    Use eina_str_has_extension instead compose of strcmp and strrchr.
---
 src/bin/ui/project_export.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/bin/ui/project_export.c b/src/bin/ui/project_export.c
index 5d61623..11696ec 100644
--- a/src/bin/ui/project_export.c
+++ b/src/bin/ui/project_export.c
@@ -51,7 +51,7 @@ _export_dev(void *data __UNUSED__,
 
    assert(selected != NULL);
 
-   if (ecore_file_is_dir(path) || (strcmp(strrchr(path, '.'), ".edj")))
+   if (ecore_file_is_dir(path) || (!eina_str_has_extension(path, ".edj")))
      {
         buf = eina_strbuf_new();
         eina_strbuf_append_printf(buf, _("Please type in actual .edj file"));
@@ -124,7 +124,7 @@ _export_release(void *data __UNUSED__,
 
    assert(selected != NULL);
 
-   if (ecore_file_is_dir(path) || (strcmp(strrchr(path, '.'), ".edj")))
+   if (ecore_file_is_dir(path) || (!eina_str_has_extension(path, ".edj")))
      {
         buf = eina_strbuf_new();
         eina_strbuf_append_printf(buf, _("Please type in actual .edj file"));

-- 


Reply via email to