screenshot-layer: Log when we can't open the output directory.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41662>
This commit is contained in:
Emma Anholt 2026-05-12 13:36:33 -07:00 committed by Marge Bot
parent 2d3dc35d55
commit 73234c7d71

View file

@ -369,7 +369,10 @@ parse_output_dir(const char *str)
output_dir[last_char_index+1] = '/';
}
DIR *dir = opendir(output_dir);
assert(dir);
if (!dir) {
LOG(ERROR, "Failed to open output directory `%s': %s\n", output_dir, strerror(errno));
return NULL;
}
closedir(dir);
return output_dir;