From 92788a90c192b77601b4fb908385d9fa6bdd85e7 Mon Sep 17 00:00:00 2001 From: Neuro Assassin <42872277+NeuroAssassin@users.noreply.github.com> Date: Thu, 17 Dec 2020 22:15:59 -0500 Subject: [PATCH] [CogManagerUI] Fix error when removing path from other OS (#4466) * Fix error when removing path from other OS * Update to draper's comment --- redbot/core/cog_manager.py | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/redbot/core/cog_manager.py b/redbot/core/cog_manager.py index 4794e2c21..18278ec0d 100644 --- a/redbot/core/cog_manager.py +++ b/redbot/core/cog_manager.py @@ -127,11 +127,7 @@ class CogManager: pathlib.Path """ - try: - path.exists() - except AttributeError: - path = Path(path) - return path + return Path(path) async def add_path(self, path: Union[Path, str]) -> None: """Add a cog path to current list. @@ -177,7 +173,7 @@ class CogManager: Path to remove. """ - path = self._ensure_path_obj(path).resolve() + path = self._ensure_path_obj(path) paths = await self.user_defined_paths() paths.remove(path)