summaryrefslogtreecommitdiff
path: root/src/lib/ethumb
diff options
context:
space:
mode:
authorCarsten Haitzler (Rasterman) <raster@rasterman.com>2016-05-31 19:01:50 +0900
committerCarsten Haitzler (Rasterman) <raster@rasterman.com>2016-05-31 19:01:50 +0900
commit5e90b860636d9ca353e00ff34630117559b7f748 (patch)
tree37be4e9c5001f5861533d057b189c645d8c0adfe /src/lib/ethumb
parent47e3b171a3902f9dd5b81af093989d8e1c425235 (diff)
ethumb - don't complain to stderr about things that are handled by api
things like load failures are up to api to deal with, not logs.
Diffstat (limited to 'src/lib/ethumb')
-rw-r--r--src/lib/ethumb/ethumb.c32
1 files changed, 7 insertions, 25 deletions
diff --git a/src/lib/ethumb/ethumb.c b/src/lib/ethumb/ethumb.c
index 4e2c5a7c35..ab7eda629e 100644
--- a/src/lib/ethumb/ethumb.c
+++ b/src/lib/ethumb/ethumb.c
@@ -900,11 +900,7 @@ ethumb_file_set(Ethumb *e, const char *path, const char *key)
900 eina_stringshare_replace(&e->thumb_key, NULL); 900 eina_stringshare_replace(&e->thumb_key, NULL);
901 901
902 DBG("ethumb=%p, path=%s, key=%s", e, path ? path : "", key ? key : ""); 902 DBG("ethumb=%p, path=%s, key=%s", e, path ? path : "", key ? key : "");
903 if (path && access(path, R_OK)) 903 if (path && access(path, R_OK)) return EINA_FALSE;
904 {
905 ERR("couldn't access file \"%s\"", path);
906 return EINA_FALSE;
907 }
908 904
909 path = _ethumb_build_absolute_path(path, buf); 905 path = _ethumb_build_absolute_path(path, buf);
910 eina_stringshare_replace(&e->src_hash, NULL); 906 eina_stringshare_replace(&e->src_hash, NULL);
@@ -1295,11 +1291,7 @@ _ethumb_plugin_generate(Ethumb *e)
1295 int i; 1291 int i;
1296 1292
1297 extp = strrchr(e->src_path, '.'); 1293 extp = strrchr(e->src_path, '.');
1298 if (!extp) 1294 if (!extp) return EINA_FALSE;
1299 {
1300 ERR("could not get extension for file \"%s\"", e->src_path);
1301 return EINA_FALSE;
1302 }
1303 1295
1304 for (i = 0; extp[i] != '\0'; i++) 1296 for (i = 0; extp[i] != '\0'; i++)
1305 ext[i] = tolower(extp[i + 1]); 1297 ext[i] = tolower(extp[i + 1]);
@@ -1558,11 +1550,7 @@ _ethumb_image_load(Ethumb *e)
1558 evas_object_show(img); 1550 evas_object_show(img);
1559 1551
1560 error = evas_object_image_load_error_get(img); 1552 error = evas_object_image_load_error_get(img);
1561 if (error != EVAS_LOAD_ERROR_NONE) 1553 if (error != EVAS_LOAD_ERROR_NONE) return 0;
1562 {
1563 ERR("could not load image '%s': %d", e->src_path, error);
1564 return 0;
1565 }
1566 1554
1567 if (e->orientation != ETHUMB_THUMB_ORIENT_NONE && 1555 if (e->orientation != ETHUMB_THUMB_ORIENT_NONE &&
1568 e->orientation != ETHUMB_THUMB_ORIENT_ORIGINAL) 1556 e->orientation != ETHUMB_THUMB_ORIENT_ORIGINAL)
@@ -1638,11 +1626,8 @@ ethumb_generate(Ethumb *e, Ethumb_Generate_Cb finished_cb, const void *data, Ein
1638 e, finished_cb, data, free_data, 1626 e, finished_cb, data, free_data,
1639 e->src_path ? e->src_path : "", e->src_key ? e->src_key : ""); 1627 e->src_path ? e->src_path : "", e->src_key ? e->src_key : "");
1640 1628
1641 if (e->finished_idler) 1629 if (e->finished_idler) return EINA_FALSE;
1642 { 1630
1643 ERR("thumbnail generation already in progress.");
1644 return EINA_FALSE;
1645 }
1646 if (e->pdata) 1631 if (e->pdata)
1647 { 1632 {
1648 e->plugin->thumb_cancel(e, e->pdata); 1633 e->plugin->thumb_cancel(e, e->pdata);
@@ -1670,8 +1655,6 @@ ethumb_generate(Ethumb *e, Ethumb_Generate_Cb finished_cb, const void *data, Ein
1670 1655
1671 if (!_ethumb_image_load(e)) 1656 if (!_ethumb_image_load(e))
1672 { 1657 {
1673 ERR("could not load input image: file=%s, key=%s",
1674 e->src_path, e->src_key);
1675 ethumb_finished_callback_call(e, 0); 1658 ethumb_finished_callback_call(e, 0);
1676 return EINA_FALSE; 1659 return EINA_FALSE;
1677 } 1660 }
@@ -1704,9 +1687,8 @@ ethumb_exists(Ethumb *e)
1704 1687
1705 EINA_SAFETY_ON_TRUE_RETURN_VAL(r_src, 0); 1688 EINA_SAFETY_ON_TRUE_RETURN_VAL(r_src, 0);
1706 1689
1707 if (r_thumb && errno != ENOENT) 1690 if ((!(r_thumb && errno != ENOENT)) &&
1708 ERR("could not access file \"%s\": %s", e->thumb_path, strerror(errno)); 1691 (!r_thumb && thumb.st_mtime > src.st_mtime))
1709 else if (!r_thumb && thumb.st_mtime > src.st_mtime)
1710 r = EINA_TRUE; 1692 r = EINA_TRUE;
1711 1693
1712 return r; 1694 return r;