summaryrefslogtreecommitdiffstats
path: root/options/path.c
diff options
context:
space:
mode:
authorsfan5 <sfan5@live.de>2023-10-02 13:14:52 +0200
committersfan5 <sfan5@live.de>2023-10-02 18:48:10 +0200
commitdf758880e26ccdb084e2ad9dd33d8c1835ac4a3f (patch)
tree48f2562087dfcbb898d6809ae3b5fc642caea2e8 /options/path.c
parent0a1e3d86852bc6267a622b9ec442c4a3ea9d66d9 (diff)
downloadmpv-df758880e26ccdb084e2ad9dd33d8c1835ac4a3f.tar.bz2
mpv-df758880e26ccdb084e2ad9dd33d8c1835ac4a3f.tar.xz
path: don't override "cache" and "state" paths with configdir
This reverts commit 576e86bfa18a0a79e591988ad93ed009edc40849 (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.
Diffstat (limited to 'options/path.c')
-rw-r--r--options/path.c10
1 files changed, 0 insertions, 10 deletions
diff --git a/options/path.c b/options/path.c
index c4fdc863a0..581874b94b 100644
--- a/options/path.c
+++ b/options/path.c
@@ -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