summaryrefslogtreecommitdiff
path: root/Source/Core/DolphinWX/Src/ISOFile.cpp
diff options
context:
space:
mode:
authorLPFaint99 <lpfaint99@gmail.com>2010-12-08 06:46:59 +0000
committerLPFaint99 <lpfaint99@gmail.com>2010-12-08 06:46:59 +0000
commit8fd825c18ccb4041ada2a08c0750a6089883fa85 (patch)
tree5b0e7e0cf11311a7b75ef614e948eec2a4f0dc3e /Source/Core/DolphinWX/Src/ISOFile.cpp
parentef093a4d3552044f3e249540c5dfc7d50adc4188 (diff)
change filename of isocache to always include extension and filesize.
Fixes issue 3669. git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6541 8ced0084-cf51-0410-be5f-012b33b47a6e
Diffstat (limited to 'Source/Core/DolphinWX/Src/ISOFile.cpp')
-rw-r--r--Source/Core/DolphinWX/Src/ISOFile.cpp18
1 files changed, 7 insertions, 11 deletions
diff --git a/Source/Core/DolphinWX/Src/ISOFile.cpp b/Source/Core/DolphinWX/Src/ISOFile.cpp
index 596863846e..530b8f665e 100644
--- a/Source/Core/DolphinWX/Src/ISOFile.cpp
+++ b/Source/Core/DolphinWX/Src/ISOFile.cpp
@@ -35,7 +35,7 @@
#include "ChunkFile.h"
#include "../resources/no_banner.cpp"
-#define CACHE_REVISION 0x10A
+#define CACHE_REVISION 0x10B
#define DVD_BANNER_WIDTH 96
#define DVD_BANNER_HEIGHT 32
@@ -179,20 +179,16 @@ void GameListItem::DoState(PointerWrap &p)
std::string GameListItem::CreateCacheFilename()
{
- std::string Filename, LegalPathname;
- SplitPath(m_FileName, &LegalPathname, &Filename, NULL);
+ std::string Filename, LegalPathname, extension;
+ SplitPath(m_FileName, &LegalPathname, &Filename, &extension);
if (Filename.empty()) return Filename; // Disc Drive
+ // Filename.extension_HashOfFolderPath_Size.cache
// Append hash to prevent ISO name-clashing in different folders.
- Filename.append(StringFromFormat("%x",
- HashFletcher((const u8 *)LegalPathname.c_str(), LegalPathname.size())));
-
- // We add gcz to the cache file if the file is compressed to avoid it reading
- // the uncompressed file's cache if it has the same name, but not the same ext.
- if (DiscIO::IsCompressedBlob(m_FileName.c_str()))
- Filename.append(".gcz");
- Filename.append(".cache");
+ Filename.append(StringFromFormat("%s_%x_%llx.cache",
+ extension.c_str(), HashFletcher((const u8 *)LegalPathname.c_str(), LegalPathname.size()),
+ File::GetSize(m_FileName.c_str())));
std::string fullname(std::string(File::GetUserPath(D_CACHE_IDX)));
fullname += Filename;