path: don't override "cache" and "state" paths with configdir

This reverts commit 576e86bfa1 (functionally).

Right now, the --config-dir option silently causes all watch_later and cache
files to be written in the --config-dir as well. This is pretty uninitutive
and also not desirable in most cases so get rid of this.
libmpv users will have to set the corresponding options or env vars if they
want to keep the old behaviour.
This commit is contained in:
sfan5 2023-10-02 13:14:52 +02:00
parent 0a1e3d8685
commit df758880e2
3 changed files with 4 additions and 10 deletions

View File

@ -95,6 +95,7 @@ Interface changes
- deprecate shared-script-properties (user-data is a replacement)
- add `--backdrop-type` option
- add `--window-affinity` option
- `--config-dir` no longer forces cache and state files to also reside in there
--- mpv 0.36.0 ---
- add `--target-contrast`
- Target luminance value is now also applied when ICC profile is used.

View File

@ -763,6 +763,9 @@ Program Behavior
as well as per-user directories are ignored, and overrides through
environment variables (``MPV_HOME``) are also ignored.
Note that the cache and state paths (``~~/cache``, ``~~/state``) are not
considered "configuration" and keep their auto-detection logic.
Note that the ``--no-config`` option takes precedence over this option.
``--dump-stats=<filename>``

View File

@ -64,12 +64,6 @@ static const char *const config_dirs[] = {
"exe_dir",
"global",
};
// types that configdir replaces (if set)
// These are not part of any fallback order so need to be overriden separately.
static const char *const config_dir_replaces[] = {
"state",
"cache",
};
// Return a platform specific path using a path type as defined in osdep/path.h.
// Keep in mind that the only way to free the return value is freeing talloc_ctx
@ -86,10 +80,6 @@ static const char *mp_get_platform_path(void *talloc_ctx,
if (strcmp(config_dirs[n], type) == 0)
return (n == 0 && global->configdir[0]) ? global->configdir : NULL;
}
for (int n = 0; n < MP_ARRAY_SIZE(config_dir_replaces); n++) {
if (strcmp(config_dir_replaces[n], type) == 0)
return global->configdir[0] ? global->configdir : NULL;
}
}
// Return the native config path if the platform doesn't support the