From 8284fc8d74cb49aa2bd97b3063ed6e503486e940 Mon Sep 17 00:00:00 2001 From: Gerald Begumisa Date: Fri, 7 Sep 2007 11:24:23 +0000 Subject: Minor fix to allow m_tags map lookup for TapePathNaming the same way its done in TapeFileNaming git-svn-id: https://oreka.svn.sourceforge.net/svnroot/oreka/trunk@484 09dcff7a-b715-0410-9601-b79a96267cd0 --- orkbasecxx/AudioTape.cpp | 29 ++++++++++++++++++++++++----- 1 file changed, 24 insertions(+), 5 deletions(-) (limited to 'orkbasecxx/AudioTape.cpp') diff --git a/orkbasecxx/AudioTape.cpp b/orkbasecxx/AudioTape.cpp index baebd36..a0d8617 100644 --- a/orkbasecxx/AudioTape.cpp +++ b/orkbasecxx/AudioTape.cpp @@ -528,9 +528,25 @@ void AudioTape::GenerateFinalFilePath() } case TapeAttributes::TaUnknown: { - pathIdentifier += element; - break; - } + std::map::iterator pair; + CStdString correctKey, mTagsValue; + + // Remove the [] + correctKey = element.substr(1, element.size()-2); + pair = m_tags.find(correctKey); + + if(pair != m_tags.end()) + { + mTagsValue = pair->second; + pathIdentifier += mTagsValue; + } + else + { + pathIdentifier += element; + } + + break; + } } } @@ -711,10 +727,13 @@ void AudioTape::GenerateFinalFilePathAndIdentifier() correctKey = element.substr(1, element.size()-2); pair = m_tags.find(correctKey); - if(pair != m_tags.end()) { + if(pair != m_tags.end()) + { mTagsValue = pair->second; fileIdentifier += mTagsValue; - } else { + } + else + { fileIdentifier += element; } -- cgit v1.2.3