mirror of
https://github.com/Cog-Creators/Red-DiscordBot.git
synced 2025-11-06 11:18:54 -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
|
pathlib.Path
|
||||||
|
|
||||||
"""
|
"""
|
||||||
try:
|
return Path(path)
|
||||||
path.exists()
|
|
||||||
except AttributeError:
|
|
||||||
path = Path(path)
|
|
||||||
return path
|
|
||||||
|
|
||||||
async def add_path(self, path: Union[Path, str]) -> None:
|
async def add_path(self, path: Union[Path, str]) -> None:
|
||||||
"""Add a cog path to current list.
|
"""Add a cog path to current list.
|
||||||
@ -177,7 +173,7 @@ class CogManager:
|
|||||||
Path to remove.
|
Path to remove.
|
||||||
|
|
||||||
"""
|
"""
|
||||||
path = self._ensure_path_obj(path).resolve()
|
path = self._ensure_path_obj(path)
|
||||||
paths = await self.user_defined_paths()
|
paths = await self.user_defined_paths()
|
||||||
|
|
||||||
paths.remove(path)
|
paths.remove(path)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user