quiet stderr on xpm load unless we are loading data this phase
authorraster <raster@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Wed, 25 Apr 2012 04:07:12 +0000 (04:07 +0000)
committerraster <raster@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Wed, 25 Apr 2012 04:07:12 +0000 (04:07 +0000)
git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/evas@70455 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33

src/modules/loaders/xpm/evas_image_load_xpm.c

index f00f92d..24a5b06 100644 (file)
@@ -145,7 +145,8 @@ evas_image_load_file_xpm(Image_Entry *ie, const char *file, const char *key __UN
    f = eina_file_open(file, 0);
    if (!f)
      {
-        ERR("XPM ERROR: file failed to open");
+        if (load_data)
+          ERR("XPM ERROR: file failed to open");
        *error = EVAS_LOAD_ERROR_DOES_NOT_EXIST;
        return EINA_FALSE;
      }
@@ -153,7 +154,8 @@ evas_image_load_file_xpm(Image_Entry *ie, const char *file, const char *key __UN
    position = 0;
    if (length < 9)
      {
-        ERR("XPM ERROR: file size, %zd, is to small", length);
+        if (load_data)
+          ERR("XPM ERROR: file size, %zd, is to small", length);
         eina_file_close(f);
        *error = EVAS_LOAD_ERROR_CORRUPT_FILE;
        return EINA_FALSE;
@@ -162,7 +164,8 @@ evas_image_load_file_xpm(Image_Entry *ie, const char *file, const char *key __UN
    map = eina_file_map_all(f, EINA_FILE_SEQUENTIAL);
    if (!map)
      {
-        ERR("XPM ERROR: file failed to mmap");
+        if (load_data)
+          ERR("XPM ERROR: file failed to mmap");
         eina_file_close(f);
        *error = EVAS_LOAD_ERROR_CORRUPT_FILE;
        return EINA_FALSE;