Merge pull request #2688 from CookiePLMonster/fix-absolute-cuesheets

CDImageCueSheet: Fix cuesheets with absolute paths
This commit is contained in:
Connor McLaughlin 2021-11-02 11:02:56 +10:00 committed by GitHub
commit e735746627
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 1 deletions

View File

@ -88,7 +88,9 @@ bool CDImageCueSheet::OpenAndParse(const char* filename, Common::Error* error)
}
if (track_file_index == m_files.size())
{
const std::string track_full_filename(FileSystem::BuildRelativePath(m_filename, track_filename));
const std::string track_full_filename(!FileSystem::IsAbsolutePath(track_filename) ?
FileSystem::BuildRelativePath(m_filename, track_filename) :
track_filename);
std::FILE* track_fp = FileSystem::OpenCFile(track_full_filename.c_str(), "rb");
if (!track_fp && track_file_index == 0)
{