mirror of
https://github.com/Cog-Creators/Red-DiscordBot.git
synced 2025-11-06 11:18:54 -05:00
Bump platformdirs to 3.x and remove the migration code for 2.x (#6098)
This commit is contained in:
parent
d8d4b4f15a
commit
5fecff0779
@ -51,14 +51,6 @@ if _system_user:
|
|||||||
config_dir = appdir.site_data_path
|
config_dir = appdir.site_data_path
|
||||||
|
|
||||||
config_file = config_dir / "config.json"
|
config_file = config_dir / "config.json"
|
||||||
if not config_file.exists() and sys.platform == "darwin":
|
|
||||||
# backwards compatibility with the location given by appdirs 1.4.4 (replaced by platformdirs 2)
|
|
||||||
# which was the same as user_data_path
|
|
||||||
# https://platformdirs.readthedocs.io/en/stable/changelog.html#platformdirs-2-0-0
|
|
||||||
_old_config_location = appdir.user_data_path / "config.json"
|
|
||||||
if _old_config_location.exists():
|
|
||||||
config_dir.mkdir(parents=True, exist_ok=True)
|
|
||||||
_old_config_location.rename(config_file)
|
|
||||||
|
|
||||||
|
|
||||||
def load_existing_config():
|
def load_existing_config():
|
||||||
|
|||||||
@ -52,7 +52,7 @@ orjson==3.8.3
|
|||||||
# via -r base.in
|
# via -r base.in
|
||||||
packaging==22.0
|
packaging==22.0
|
||||||
# via -r base.in
|
# via -r base.in
|
||||||
platformdirs==2.6.0
|
platformdirs==3.2.0
|
||||||
# via -r base.in
|
# via -r base.in
|
||||||
psutil==5.9.4
|
psutil==5.9.4
|
||||||
# via -r base.in
|
# via -r base.in
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user