Trash handling is too high level for FileUtil, move it up.

This commit is contained in:
Henrik Rydgård
2025-04-15 17:42:24 +02:00
parent ef2451fc45
commit 71533ac2b7
15 changed files with 118 additions and 105 deletions
+6 -1
View File
@@ -49,6 +49,7 @@
#include "Common/GPU/Vulkan/VulkanLoader.h"
#include "Common/VR/PPSSPPVR.h"
#include "Common/System/OSD.h"
#include "Common/System/Request.h"
#include "Core/Config.h"
#include "Core/ConfigSettings.h"
#include "Core/ConfigValues.h"
@@ -1690,7 +1691,11 @@ bool Config::deleteGameConfig(const std::string& pGameId) {
Path fullIniFilePath = Path(getGameConfigFile(pGameId, &exists));
if (exists) {
File::MoveFileToTrashOrDelete(fullIniFilePath);
if (System_GetPropertyBool(SYSPROP_HAS_TRASH_BIN)) {
System_MoveToTrash(fullIniFilePath);
} else {
File::Delete(fullIniFilePath);
}
}
return true;
}