From 73234c7d7105fe4ba1ae33bfd5de883dfec906c5 Mon Sep 17 00:00:00 2001 From: Emma Anholt Date: Tue, 12 May 2026 13:36:33 -0700 Subject: [PATCH] screenshot-layer: Log when we can't open the output directory. Part-of: --- src/vulkan/screenshot-layer/screenshot_params.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/vulkan/screenshot-layer/screenshot_params.c b/src/vulkan/screenshot-layer/screenshot_params.c index cd6d0e43278..0571ce2b7c4 100644 --- a/src/vulkan/screenshot-layer/screenshot_params.c +++ b/src/vulkan/screenshot-layer/screenshot_params.c @@ -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;