mirror of
https://github.com/mpv-player/mpv
synced 2025-03-19 18:05:21 +00:00
command: let screenshot_to_file command overwrite files
The old behavior does not make too much sense after all. If you don't want to file to be overwritten, the user can check this manually. This is a change in behavior - let's hope nobody actually relied on it.
This commit is contained in:
parent
533b0c70e1
commit
547976633f
@ -187,8 +187,7 @@ List of Input Commands
|
||||
|
||||
The second argument is like the first argument to ``screenshot``.
|
||||
|
||||
This command tries to never overwrite files. If the file already exists,
|
||||
it fails.
|
||||
If the file already exists, it's overwritten.
|
||||
|
||||
Like all input command parameters, the filename is subject to property
|
||||
expansion as described in `Property Expansion`_.
|
||||
|
@ -370,11 +370,6 @@ void screenshot_to_file(struct MPContext *mpctx, const char *filename, int mode,
|
||||
bool old_osd = ctx->osd;
|
||||
ctx->osd = osd;
|
||||
|
||||
if (mp_path_exists(filename)) {
|
||||
screenshot_msg(ctx, SMSG_ERR, "Screenshot: file '%s' already exists.",
|
||||
filename);
|
||||
goto end;
|
||||
}
|
||||
char *ext = mp_splitext(filename, NULL);
|
||||
if (ext)
|
||||
opts.format = ext;
|
||||
|
Loading…
Reference in New Issue
Block a user