From cb52ee0a4d96fcc786d2d0d972794cf55b432db3 Mon Sep 17 00:00:00 2001 From: Eladash Date: Mon, 3 Feb 2020 09:31:31 +0200 Subject: [PATCH] cellGame: report fs::remove_all failure --- rpcs3/Emu/Cell/Modules/cellGame.cpp | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/rpcs3/Emu/Cell/Modules/cellGame.cpp b/rpcs3/Emu/Cell/Modules/cellGame.cpp index 269bdab415..8ecd36d986 100644 --- a/rpcs3/Emu/Cell/Modules/cellGame.cpp +++ b/rpcs3/Emu/Cell/Modules/cellGame.cpp @@ -133,16 +133,23 @@ struct content_permission final ~content_permission() { + bool success = false; + fs::g_tls_error = fs::error::ok; + try { - if (temp.size() > 1) + if (temp.size() <= 1 || fs::remove_all(temp)) { - fs::remove_all(temp); + success = true; } } catch (...) { - cellGame.fatal("Failed to clean directory '%s'", temp); + } + + if (!success) + { + cellGame.fatal("Failed to clean directory '%s' (%s)", temp, fs::g_tls_error); } } };