From b7f73a42bed1386edf254b7f751f2783750a280c Mon Sep 17 00:00:00 2001 From: Silent Date: Sat, 30 Oct 2021 11:17:41 +0200 Subject: [PATCH] CDImageCueSheet: Fix cuesheets with absolute paths --- src/common/cd_image_cue.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/common/cd_image_cue.cpp b/src/common/cd_image_cue.cpp index 12d68a549..8c7865b71 100644 --- a/src/common/cd_image_cue.cpp +++ b/src/common/cd_image_cue.cpp @@ -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) {