Hotfix to downloader

So we stop nuking data folders...sorry for past user settings :/
This commit is contained in:
Will 2016-05-05 22:09:26 -04:00
parent a61eb982ea
commit 111ed83d89

View File

@ -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