From 26e8fd59ebfe4fb47587b7e1955b7f689b96b341 Mon Sep 17 00:00:00 2001 From: tjmgd <92784061+tjmgd@users.noreply.github.com> Date: Wed, 1 Dec 2021 21:05:57 +0000 Subject: [PATCH] Fix for bug while deleting file. This is due to a problem in the file path. (#5948) Signed-off-by: T.J. McGrath-Daly Co-authored-by: Tobias Alexander Franke --- Gems/AudioSystem/Code/Source/Editor/AudioControlsWriter.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Gems/AudioSystem/Code/Source/Editor/AudioControlsWriter.cpp b/Gems/AudioSystem/Code/Source/Editor/AudioControlsWriter.cpp index eb022b706f..86f778bf03 100644 --- a/Gems/AudioSystem/Code/Source/Editor/AudioControlsWriter.cpp +++ b/Gems/AudioSystem/Code/Source/Editor/AudioControlsWriter.cpp @@ -102,7 +102,8 @@ namespace AudioControls for (auto it = librariesToDelete.begin(); it != librariesToDelete.end(); ++it) { - DeleteLibraryFile((*it).c_str()); + auto newPathOpt = fileIO->ResolvePath(AZ::IO::PathView{ *it }); + DeleteLibraryFile(newPathOpt.value().Native()); } previousLibraryPaths = m_foundLibraryPaths;