From ab2f85b6b883217cda407be73d273b0ddea61dcf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20Rydg=C3=A5rd?= Date: Sun, 1 Jun 2025 10:42:15 +0200 Subject: [PATCH] Crashfix in folder move logging. Plus relax an assert --- Core/Util/MemStick.cpp | 8 ++++---- GPU/Common/PresentationCommon.cpp | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Core/Util/MemStick.cpp b/Core/Util/MemStick.cpp index 6791aa18a2..8189886503 100644 --- a/Core/Util/MemStick.cpp +++ b/Core/Util/MemStick.cpp @@ -161,7 +161,7 @@ MoveResult *MoveDirectoryContentsSafe(Path moveSrc, Path moveDest, MoveProgressR // We loop through the files/dirs in the source directory and just try to move them, it should work. if (MoveChildrenFast(moveSrc, moveDest, progressReporter)) { INFO_LOG(Log::System, "Quick-move succeeded after %0.1f ms", moveStart.ElapsedMs()); - progressReporter.SetProgress(StringFromFormat("%s (%0.3s)", ms->T_cstr("Done!"), moveStart.ElapsedSeconds())); + progressReporter.SetProgress(StringFromFormat("%s (%0.3f)", ms->T_cstr("Done!"), moveStart.ElapsedSeconds())); return new MoveResult{ true, "" }; } else { INFO_LOG(Log::System, "Quick move denied after %0.1f ms, falling back to slow move.", moveStart.ElapsedMs()); @@ -178,9 +178,9 @@ MoveResult *MoveDirectoryContentsSafe(Path moveSrc, Path moveDest, MoveProgressR // NOTE: It's correct to pass moveSrc twice here, it's to keep the root in the recursion. if (!ListFileSuffixesRecursively(moveSrc, moveSrc, directorySuffixesToCreate, fileSuffixesToMove, progressReporter)) { // TODO: Handle failure listing files. - std::string error = "Failed to read old directory"; - INFO_LOG(Log::System, "%s", error.c_str()); - progressReporter.SetProgress(ms->T(error.c_str())); + const char *error = "Failed to read old directory"; + INFO_LOG(Log::System, "%s", error); + progressReporter.SetProgress(ms->T(error)); return new MoveResult{ false, error }; } diff --git a/GPU/Common/PresentationCommon.cpp b/GPU/Common/PresentationCommon.cpp index ecf9ff136c..e1f4c3722f 100644 --- a/GPU/Common/PresentationCommon.cpp +++ b/GPU/Common/PresentationCommon.cpp @@ -526,7 +526,7 @@ Draw::Pipeline *PresentationCommon::CreatePipeline(std::vectorCreateBuffer(sizeof(Vertex) * 12, BufferUsageFlag::DYNAMIC | BufferUsageFlag::VERTEXDATA);