Simplified r_mkdir()

This commit is contained in:
Bert Münnich
2015-10-28 23:21:12 +01:00
parent d3a70a285d
commit a7d39b0ab8
3 changed files with 18 additions and 31 deletions

View File

@ -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) {