Fixed double game entries in the game list. This occurs when there are two or more games of the same name in different folders. Fix by Lostmoment.
Fixes issue 2857. git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6380 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
parent
adbd7fbd4a
commit
45f1948d33
|
@ -26,6 +26,7 @@
|
||||||
#include "FileUtil.h"
|
#include "FileUtil.h"
|
||||||
#include "ISOFile.h"
|
#include "ISOFile.h"
|
||||||
#include "StringUtil.h"
|
#include "StringUtil.h"
|
||||||
|
#include "Hash.h"
|
||||||
|
|
||||||
#include "Filesystem.h"
|
#include "Filesystem.h"
|
||||||
#include "BannerLoader.h"
|
#include "BannerLoader.h"
|
||||||
|
@ -178,10 +179,15 @@ void GameListItem::DoState(PointerWrap &p)
|
||||||
|
|
||||||
std::string GameListItem::CreateCacheFilename()
|
std::string GameListItem::CreateCacheFilename()
|
||||||
{
|
{
|
||||||
std::string Filename;
|
std::string Filename, LegalPathname;
|
||||||
SplitPath(m_FileName, NULL, &Filename, NULL);
|
SplitPath(m_FileName, &LegalPathname, &Filename, NULL);
|
||||||
|
|
||||||
if (Filename.empty()) return Filename; // Disc Drive
|
if (Filename.empty()) return Filename; // Disc Drive
|
||||||
|
|
||||||
|
// 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
|
// 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.
|
// the uncompressed file's cache if it has the same name, but not the same ext.
|
||||||
if (DiscIO::IsCompressedBlob(m_FileName.c_str()))
|
if (DiscIO::IsCompressedBlob(m_FileName.c_str()))
|
||||||
|
|
Loading…
Reference in New Issue