Do not print could-not-open-warnings for files found by directory traversal

This commit is contained in:
Bert Münnich
2014-10-24 11:14:01 +02:00
parent e15dabde74
commit 93e2a757d4
4 changed files with 14 additions and 11 deletions

View File

@ -323,7 +323,8 @@ bool tns_load(tns_t *tns, int n, bool force)
if (im == NULL && (access(file->path, R_OK) < 0 ||
(im = imlib_load_image(file->path)) == NULL))
{
warn("could not open image: %s", file->name);
if (file->warn)
warn("could not open image: %s", file->name);
return false;
}
}