diff --git a/bot/helper/download_status.py b/bot/helper/download_status.py index d1f4f37..f12ba3a 100644 --- a/bot/helper/download_status.py +++ b/bot/helper/download_status.py @@ -31,7 +31,7 @@ class DownloadStatus: return self.__download.name def path(self): - return "{}{}/{}".format(DOWNLOAD_DIR, self.__uid, self.name()) + return "{}{}".format(DOWNLOAD_DIR, self.__uid) def size(self): return self.__download.total_length_string() diff --git a/bot/helper/fs_utils.py b/bot/helper/fs_utils.py index 50c34dc..50d58d5 100644 --- a/bot/helper/fs_utils.py +++ b/bot/helper/fs_utils.py @@ -8,10 +8,8 @@ import mimetypes def clean_download(path: str): if os.path.exists(path): - if os.path.isfile(path): - os.remove(path) - else: - shutil.rmtree(path) + LOGGER.info("Cleaning download: {}".format(path)) + shutil.rmtree(path) def exit_clean_up(signal, frame):