mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-10-13 06:20:26 +02:00
Fix deleting homebrew from the game screen UI
This commit is contained in:
1 parent
8b1ef01b5a
commit
7066c053a2
1 file changed
+15
-4
+15
-4
@@ -24,15 +24,16 @@
|
||||
#include "file/file_util.h"
|
||||
#include "file/zip_read.h"
|
||||
#include "thread/prioritizedworkqueue.h"
|
||||
#include "Common/FileUtil.h"
|
||||
#include "Common/StringUtils.h"
|
||||
#include "GameInfoCache.h"
|
||||
#include "Core/FileSystems/ISOFileSystem.h"
|
||||
#include "Core/FileSystems/DirectoryFileSystem.h"
|
||||
#include "Core/FileSystems/VirtualDiscFileSystem.h"
|
||||
#include "Core/ELF/PBPReader.h"
|
||||
#include "Core/System.h"
|
||||
|
||||
#include "Core/Util/GameManager.h"
|
||||
#include "Core/Config.h"
|
||||
#include "UI/GameInfoCache.h"
|
||||
|
||||
GameInfoCache g_gameInfoCache;
|
||||
|
||||
@@ -51,8 +52,18 @@ bool GameInfo::DeleteGame() {
|
||||
return true;
|
||||
}
|
||||
case FILETYPE_PSP_PBP_DIRECTORY:
|
||||
// Recursively deleting directories not yet supported
|
||||
return false;
|
||||
{
|
||||
// TODO: This could be handled by Core/Util/GameManager too somehow.
|
||||
|
||||
const char *directoryToRemove = fileInfo.fullName.c_str();
|
||||
INFO_LOG(HLE, "Deleting %s", directoryToRemove);
|
||||
if (!File::DeleteDirRecursively(directoryToRemove)) {
|
||||
ERROR_LOG(HLE, "Failed to delete file");
|
||||
return false;
|
||||
}
|
||||
g_Config.CleanRecent();
|
||||
return true;
|
||||
}
|
||||
|
||||
default:
|
||||
return false;
|
||||
|
||||
Reference in new issue
Block a user