[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 <tobyharradine@gmail.com>
This commit is contained in:
Toby Harradine 2019-06-09 16:04:13 +10:00 committed by GitHub
parent 682ee1a459
commit d133598d80
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -213,7 +213,8 @@ class ServerManager:
file.flush() file.flush()
finally: finally:
file.close() file.close()
pathlib.Path(path).replace(LAVALINK_JAR_FILE)
shutil.move(path, str(LAVALINK_JAR_FILE), copy_function=shutil.copyfile)
@classmethod @classmethod
async def _is_up_to_date(cls): async def _is_up_to_date(cls):