From d133598d80a6ba5f41505e946d81bb0ad41823e1 Mon Sep 17 00:00:00 2001 From: Toby Harradine Date: Sun, 9 Jun 2019 16:04:13 +1000 Subject: [PATCH] [Audio] Fix OSErrors on mixed-filesystem environments (#2765) Resolves the issue outlined [here](https://github.com/Cog-Creators/Red-DiscordBot/issues/2682#issuecomment-500185495). Signed-off-by: Toby Harradine --- redbot/cogs/audio/manager.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/redbot/cogs/audio/manager.py b/redbot/cogs/audio/manager.py index c5e7ba886..3c9b7a501 100644 --- a/redbot/cogs/audio/manager.py +++ b/redbot/cogs/audio/manager.py @@ -213,7 +213,8 @@ class ServerManager: file.flush() finally: file.close() - pathlib.Path(path).replace(LAVALINK_JAR_FILE) + + shutil.move(path, str(LAVALINK_JAR_FILE), copy_function=shutil.copyfile) @classmethod async def _is_up_to_date(cls):