From 9ecbf5c878cfe2071373220ce804ee271d66d239 Mon Sep 17 00:00:00 2001 From: WhitePeter Date: Fri, 7 Nov 2025 18:29:57 +0100 Subject: [PATCH] screenshot: remove redundant mkdirp call There is no reason to create the screenshot dir separately, because the final path starts with it. So defer creating directories to the last possible moment with all the information necessary. --- player/screenshot.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/player/screenshot.c b/player/screenshot.c index aba06da6a1..c67e23eacf 100644 --- a/player/screenshot.c +++ b/player/screenshot.c @@ -305,9 +305,6 @@ static char *gen_fname(struct mp_cmd_ctx *cmd, const char *file_ext) void *t = fname; dir = mp_get_user_path(t, ctx->mpctx->global, dir); fname = mp_path_join(NULL, dir, fname); - - mp_mkdirp(dir); - talloc_free(t); }