mirror of
https://github.com/Cog-Creators/Red-DiscordBot.git
synced 2025-11-06 03:08:55 -05:00
[CogManagerUI] Fix error when removing path from other OS (#4466)
* Fix error when removing path from other OS * Update to draper's comment
This commit is contained in:
parent
3a12a9b47f
commit
92788a90c1
@ -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)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user