Clean up legacy wakatime-cli directory if exists

This commit is contained in:
Alan Hamlett 2022-02-21 20:08:48 -08:00
parent b405f99cff
commit 847223cdce

View File

@ -639,6 +639,9 @@ class DownloadCLI(threading.Thread):
def run(self):
log(INFO, 'Downloading wakatime-cli...')
if os.path.isdir(os.path.join(RESOURCES_FOLDER, 'wakatime-cli')):
shutil.rmtree(os.path.join(RESOURCES_FOLDER, 'wakatime-cli'))
if not os.path.exists(RESOURCES_FOLDER):
os.makedirs(RESOURCES_FOLDER)