|
|
@ -239,6 +239,7 @@ bool tns_load(tns_t *tns, int n, bool force, bool cache_only)
|
|
|
|
float zw, zh;
|
|
|
|
float zw, zh;
|
|
|
|
thumb_t *t;
|
|
|
|
thumb_t *t;
|
|
|
|
fileinfo_t *file;
|
|
|
|
fileinfo_t *file;
|
|
|
|
|
|
|
|
struct stat st;
|
|
|
|
Imlib_Image im = NULL;
|
|
|
|
Imlib_Image im = NULL;
|
|
|
|
|
|
|
|
|
|
|
|
if (n < 0 || n >= *tns->cnt)
|
|
|
|
if (n < 0 || n >= *tns->cnt)
|
|
|
@ -330,13 +331,16 @@ bool tns_load(tns_t *tns, int n, bool force, bool cache_only)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if (im == NULL && (access(file->path, R_OK) < 0 ||
|
|
|
|
if (im == NULL) {
|
|
|
|
(im = imlib_load_image(file->path)) == NULL))
|
|
|
|
if (access(file->path, R_OK) == -1 ||
|
|
|
|
|
|
|
|
stat(file->path, &st) == -1 || !S_ISREG(st.st_mode) ||
|
|
|
|
|
|
|
|
(im = imlib_load_image(file->path)) == NULL)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
if (file->flags & FF_WARN)
|
|
|
|
if (file->flags & FF_WARN)
|
|
|
|
error(0, 0, "%s: Error opening image", file->name);
|
|
|
|
error(0, 0, "%s: Error opening image", file->name);
|
|
|
|
return false;
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
imlib_context_set_image(im);
|
|
|
|
imlib_context_set_image(im);
|
|
|
|
|
|
|
|
|
|
|
|
if (!cache_hit) {
|
|
|
|
if (!cache_hit) {
|
|
|
|