summaryrefslogtreecommitdiffstats
path: root/thumbs.c
diff options
context:
space:
mode:
authorBert Münnich <ber.t@posteo.de>2015-10-28 23:21:12 +0100
committerBert Münnich <ber.t@posteo.de>2015-10-28 23:21:12 +0100
commita7d39b0ab8fabb4f6417bb69a4e70d9da598d1aa (patch)
tree9e1e5e65bc2815c42cac5299e579d1638728070d /thumbs.c
parentd3a70a285d03224fde9e6ef36eba9de21b773f39 (diff)
downloadnsxiv-a7d39b0ab8fabb4f6417bb69a4e70d9da598d1aa.tar.zst
Simplified r_mkdir()
Diffstat (limited to 'thumbs.c')
-rw-r--r--thumbs.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/thumbs.c b/thumbs.c
index f10a1aa..c4cc130 100644
--- a/thumbs.c
+++ b/thumbs.c
@@ -92,7 +92,8 @@ void tns_cache_write(Imlib_Image im, const char *filepath, bool force)
{
if ((dirend = strrchr(cfile, '/')) != NULL) {
*dirend = '\0';
- err = r_mkdir(cfile);
+ if ((err = r_mkdir(cfile)) == -1)
+ error(0, errno, "%s", cfile);
*dirend = '/';
}
if (err == 0) {