mirror of https://github.com/mpv-player/mpv
player: don't complain on too long filenames
mpv supports per-file config files, basically filename+".conf". We use a static buffer for the new filename, and if that buffer is too small, we print a warning. This is confusing for e.g. long URLs, so just hide the warning by default. Why not dynamically allocate the buffer? Who cares.
This commit is contained in:
parent
6f86e32630
commit
4b367d1602
|
@ -114,8 +114,8 @@ static void mp_load_per_file_config(struct MPContext *mpctx)
|
|||
const char *file = mpctx->filename;
|
||||
|
||||
if (snprintf(cfg, sizeof(cfg), "%s.conf", file) >= sizeof(cfg)) {
|
||||
MP_WARN(mpctx, "Filename is too long, "
|
||||
"can not load file or directory specific config files\n");
|
||||
MP_VERBOSE(mpctx, "Filename is too long, "
|
||||
"can not load file or directory specific config files\n");
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue