ethumb: reduce number of generate.
authorcedric <cedric@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Thu, 28 Apr 2011 17:00:49 +0000 (17:00 +0000)
committercedric <cedric@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Thu, 28 Apr 2011 17:00:49 +0000 (17:00 +0000)
git-svn-id: https://svn.enlightenment.org/svn/e/trunk/ethumb@59018 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33

src/bin/ethumbd_child.c

index 38b155d..aeae424 100644 (file)
@@ -271,7 +271,15 @@ _ec_op_generate(struct _Ethumbd_Child *ec)
 
    ethumb_file_set(ec->ethumbt[index], path, key);
    ethumb_thumb_path_set(ec->ethumbt[index], thumb_path, thumb_key);
-   ethumb_generate(ec->ethumbt[index], _ec_op_generated_cb, ec, NULL);
+
+   if (ethumb_exists(ec->ethumbt[index]))
+     {
+        _ec_op_generated_cb(ec, ec->ethumbt[index], EINA_TRUE);
+     }
+   else
+     {
+        ethumb_generate(ec->ethumbt[index], _ec_op_generated_cb, ec, NULL);
+     }
 
    free(path);
    free(key);