From d6511fb550f9589a30eba9a8b47555200349c5dd Mon Sep 17 00:00:00 2001 From: SeaswimmerTheFsh Date: Tue, 1 Aug 2023 15:07:54 -0400 Subject: [PATCH] fix: made change_data_path return if data_path is none --- musicdownloader/musicdownloader.py | 1 + 1 file changed, 1 insertion(+) diff --git a/musicdownloader/musicdownloader.py b/musicdownloader/musicdownloader.py index 879040b..7840ca5 100644 --- a/musicdownloader/musicdownloader.py +++ b/musicdownloader/musicdownloader.py @@ -20,6 +20,7 @@ class MusicDownloader(commands.Cog): old_path = await self.config.save_directory() if not data_path: await ctx.send(f"The current data path is `{old_path}`.") + return if os.path.isdir(data_path): await self.config.save_directory.set(data_path) embed=discord.Embed(color=await self.bot.get_embed_color(None), description=f"The save directory has been set to `{data_path}`.\n It was previously set to `{old_path}`.")