CDImageCueSheet: Fix cuesheets with absolute paths

This commit is contained in:
Silent 2021-10-30 11:17:41 +02:00
parent 287b1e1abc
commit b7f73a42be
No known key found for this signature in database
GPG Key ID: AE53149BB0C45AF1

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)
{