mirror of https://github.com/AxioDL/metaforce.git
PAKRouter fix
This commit is contained in:
parent
f2ebc3c5da
commit
8cb4bacb17
|
@ -274,9 +274,9 @@ hecl::ProjectPath PAKRouter<BRIDGETYPE>::getWorking(const EntryType* entry,
|
||||||
auto uniqueSearch = m_uniqueEntries.find(entry->id);
|
auto uniqueSearch = m_uniqueEntries.find(entry->id);
|
||||||
if (uniqueSearch != m_uniqueEntries.end())
|
if (uniqueSearch != m_uniqueEntries.end())
|
||||||
{
|
{
|
||||||
|
const BRIDGETYPE& bridge = m_bridges->at(uniqueSearch->second.first);
|
||||||
const hecl::ProjectPath& pakPath = m_bridgePaths[uniqueSearch->second.first].first;
|
const hecl::ProjectPath& pakPath = m_bridgePaths[uniqueSearch->second.first].first;
|
||||||
pakPath.makeDir();
|
pakPath.makeDir();
|
||||||
hecl::ProjectPath uniquePath = entry->unique.uniquePath(pakPath);
|
|
||||||
#if HECL_UCS2
|
#if HECL_UCS2
|
||||||
hecl::SystemString entName = hecl::UTF8ToWide(getBestEntryName(*entry));
|
hecl::SystemString entName = hecl::UTF8ToWide(getBestEntryName(*entry));
|
||||||
#else
|
#else
|
||||||
|
@ -284,8 +284,16 @@ hecl::ProjectPath PAKRouter<BRIDGETYPE>::getWorking(const EntryType* entry,
|
||||||
#endif
|
#endif
|
||||||
if (extractor.fileExts[0] && !extractor.fileExts[1])
|
if (extractor.fileExts[0] && !extractor.fileExts[1])
|
||||||
entName += extractor.fileExts[0];
|
entName += extractor.fileExts[0];
|
||||||
|
if (bridge.getPAK().m_noShare)
|
||||||
|
{
|
||||||
|
return hecl::ProjectPath(pakPath, entName);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
hecl::ProjectPath uniquePath = entry->unique.uniquePath(pakPath);
|
||||||
return hecl::ProjectPath(uniquePath, entName);
|
return hecl::ProjectPath(uniquePath, entName);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
auto sharedSearch = m_sharedEntries.find(entry->id);
|
auto sharedSearch = m_sharedEntries.find(entry->id);
|
||||||
if (sharedSearch != m_sharedEntries.end())
|
if (sharedSearch != m_sharedEntries.end())
|
||||||
|
@ -342,11 +350,19 @@ hecl::ProjectPath PAKRouter<BRIDGETYPE>::getCooked(const EntryType* entry) const
|
||||||
auto uniqueSearch = m_uniqueEntries.find(entry->id);
|
auto uniqueSearch = m_uniqueEntries.find(entry->id);
|
||||||
if (uniqueSearch != m_uniqueEntries.end())
|
if (uniqueSearch != m_uniqueEntries.end())
|
||||||
{
|
{
|
||||||
|
const BRIDGETYPE& bridge = m_bridges->at(uniqueSearch->second.first);
|
||||||
const hecl::ProjectPath& pakPath = m_bridgePaths[uniqueSearch->second.first].second;
|
const hecl::ProjectPath& pakPath = m_bridgePaths[uniqueSearch->second.first].second;
|
||||||
pakPath.makeDir();
|
pakPath.makeDir();
|
||||||
|
if (bridge.getPAK().m_noShare)
|
||||||
|
{
|
||||||
|
return hecl::ProjectPath(pakPath, getBestEntryName(*entry));
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
hecl::ProjectPath uniquePath = entry->unique.uniquePath(pakPath);
|
hecl::ProjectPath uniquePath = entry->unique.uniquePath(pakPath);
|
||||||
return hecl::ProjectPath(uniquePath, getBestEntryName(*entry));
|
return hecl::ProjectPath(uniquePath, getBestEntryName(*entry));
|
||||||
}
|
}
|
||||||
|
}
|
||||||
auto sharedSearch = m_sharedEntries.find(entry->id);
|
auto sharedSearch = m_sharedEntries.find(entry->id);
|
||||||
if (sharedSearch != m_sharedEntries.end())
|
if (sharedSearch != m_sharedEntries.end())
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue