mirror of
https://github.com/Cog-Creators/Red-DiscordBot.git
synced 2025-11-06 19:28:54 -05:00
Hotfix to downloader
So we stop nuking data folders...sorry for past user settings :/
This commit is contained in:
parent
a61eb982ea
commit
111ed83d89
@ -7,6 +7,7 @@ import os
|
|||||||
from subprocess import call, Popen
|
from subprocess import call, Popen
|
||||||
import shutil
|
import shutil
|
||||||
import asyncio
|
import asyncio
|
||||||
|
from setuptools import distutils
|
||||||
|
|
||||||
|
|
||||||
class Downloader:
|
class Downloader:
|
||||||
@ -196,9 +197,8 @@ class Downloader:
|
|||||||
|
|
||||||
if os.path.exists(cog_data_path):
|
if os.path.exists(cog_data_path):
|
||||||
print("Copying {}'s data folder...".format(cog))
|
print("Copying {}'s data folder...".format(cog))
|
||||||
if os.path.exists(os.path.join('data/', cog)):
|
distutils.dir_util.copy_tree(cog_data_path,
|
||||||
shutil.rmtree(os.path.join('data/', cog))
|
os.path.join('data/', cog))
|
||||||
shutil.copytree(cog_data_path, os.path.join('data/', cog))
|
|
||||||
self.repos[repo_name][cog]['INSTALLED'] = True
|
self.repos[repo_name][cog]['INSTALLED'] = True
|
||||||
self.save_repos()
|
self.save_repos()
|
||||||
return True
|
return True
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user