-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
path: use XDG cache and XDG data dirs by default
Currently, mpv stores some non-config data in ~/.config by default. For users that back up their dotconfigs, this can be annoying. This reworks the path logic to make use of the XDG_CACHE_HOME and XDG_DATA_HOME environment variables with the appropriate fallbacks if they don't exist. mpv's watch_later directory is now stored in the data directory (~/.local/share/mpv for most users). This part of the change only affects *nix users. Other platforms will still use the config directory since the XDG paradigm doesn't exist there. In a separate but related change, the --cache-dir options defaults to the cache directory (~/.cache/mpv for most users). The change in where to store cache does affect all platforms. For those that aren't on *nix systems, the default cache directory is the same as their config directory. Both of these new directories are only used if the user is using XDG_CONFIG_HOME (or the default ~/.config/mpv fallback). If the user is using the old compatibility path (~/.mpv) or has forced a config directory (either using the --configdir option or the MPV_HOME environment variable), then everything is stored in the config directory like before and there is no splitting of data. Internally, this change modifies the mp_find_user_config_file and mp_mk_config_dir functions to make them slightly more generic (now named mp_find_user_file and mp_mk_user_dir respectively).
- Loading branch information
1 parent
96bcf51
commit 44d2394
Showing
11 changed files
with
72 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters