Skip to content

Commit 896d9d2

Browse files
committed
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.
1 parent b695941 commit 896d9d2

File tree

1 file changed

+0
-3
lines changed

1 file changed

+0
-3
lines changed

player/screenshot.c

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -305,9 +305,6 @@ static char *gen_fname(struct mp_cmd_ctx *cmd, const char *file_ext)
305305
void *t = fname;
306306
dir = mp_get_user_path(t, ctx->mpctx->global, dir);
307307
fname = mp_path_join(NULL, dir, fname);
308-
309-
mkdirp(dir);
310-
311308
talloc_free(t);
312309
}
313310

0 commit comments

Comments
 (0)