Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Common: Remove dead code in NandPaths #5184

Merged
merged 1 commit into from
Mar 31, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
32 changes: 0 additions & 32 deletions Source/Core/Common/NandPaths.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -52,38 +52,6 @@ std::string GetTitleContentPath(u64 _titleID, FromWhichRoot from)
(u32)(_titleID >> 32), (u32)_titleID);
}

bool CheckTitleTMD(u64 _titleID, FromWhichRoot from)
{
const std::string TitlePath = GetTMDFileName(_titleID, from);
if (File::Exists(TitlePath))
{
File::IOFile pTMDFile(TitlePath, "rb");
u64 TitleID = 0;
pTMDFile.Seek(0x18C, SEEK_SET);
if (pTMDFile.ReadArray(&TitleID, 1) && _titleID == Common::swap64(TitleID))
return true;
}
INFO_LOG(DISCIO, "Invalid or no tmd for title %08x %08x", (u32)(_titleID >> 32),
(u32)(_titleID & 0xFFFFFFFF));
return false;
}

bool CheckTitleTIK(u64 _titleID, FromWhichRoot from)
{
const std::string ticketFileName = Common::GetTicketFileName(_titleID, from);
if (File::Exists(ticketFileName))
{
File::IOFile pTIKFile(ticketFileName, "rb");
u64 TitleID = 0;
pTIKFile.Seek(0x1dC, SEEK_SET);
if (pTIKFile.ReadArray(&TitleID, 1) && _titleID == Common::swap64(TitleID))
return true;
}
INFO_LOG(DISCIO, "Invalid or no tik for title %08x %08x", (u32)(_titleID >> 32),
(u32)(_titleID & 0xFFFFFFFF));
return false;
}

std::string EscapeFileName(const std::string& filename)
{
// Prevent paths from containing special names like ., .., ..., ...., and so on
Expand Down
2 changes: 0 additions & 2 deletions Source/Core/Common/NandPaths.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,6 @@ std::string GetTicketFileName(u64 _titleID, FromWhichRoot from);
std::string GetTMDFileName(u64 _titleID, FromWhichRoot from);
std::string GetTitleDataPath(u64 _titleID, FromWhichRoot from);
std::string GetTitleContentPath(u64 _titleID, FromWhichRoot from);
bool CheckTitleTMD(u64 _titleID, FromWhichRoot from);
bool CheckTitleTIK(u64 _titleID, FromWhichRoot from);

// Escapes characters that are invalid or have special meanings in the host file system
std::string EscapeFileName(const std::string& filename);
Expand Down