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);
|
||||
if (uniqueSearch != m_uniqueEntries.end())
|
||||
{
|
||||
const BRIDGETYPE& bridge = m_bridges->at(uniqueSearch->second.first);
|
||||
const hecl::ProjectPath& pakPath = m_bridgePaths[uniqueSearch->second.first].first;
|
||||
pakPath.makeDir();
|
||||
hecl::ProjectPath uniquePath = entry->unique.uniquePath(pakPath);
|
||||
#if HECL_UCS2
|
||||
hecl::SystemString entName = hecl::UTF8ToWide(getBestEntryName(*entry));
|
||||
#else
|
||||
|
@ -284,8 +284,16 @@ hecl::ProjectPath PAKRouter<BRIDGETYPE>::getWorking(const EntryType* entry,
|
|||
#endif
|
||||
if (extractor.fileExts[0] && !extractor.fileExts[1])
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
||||
auto sharedSearch = m_sharedEntries.find(entry->id);
|
||||
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);
|
||||
if (uniqueSearch != m_uniqueEntries.end())
|
||||
{
|
||||
const BRIDGETYPE& bridge = m_bridges->at(uniqueSearch->second.first);
|
||||
const hecl::ProjectPath& pakPath = m_bridgePaths[uniqueSearch->second.first].second;
|
||||
pakPath.makeDir();
|
||||
if (bridge.getPAK().m_noShare)
|
||||
{
|
||||
return hecl::ProjectPath(pakPath, getBestEntryName(*entry));
|
||||
}
|
||||
else
|
||||
{
|
||||
hecl::ProjectPath uniquePath = entry->unique.uniquePath(pakPath);
|
||||
return hecl::ProjectPath(uniquePath, getBestEntryName(*entry));
|
||||
}
|
||||
}
|
||||
auto sharedSearch = m_sharedEntries.find(entry->id);
|
||||
if (sharedSearch != m_sharedEntries.end())
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue