Move path related functions into PathUtil

This commit is contained in:
Birunthan Mohanathas
2013-06-12 21:14:55 +03:00
parent 68430b54db
commit d079d13da6
14 changed files with 236 additions and 137 deletions

View File

@ -17,6 +17,7 @@
*/
#include "StdAfx.h"
#include "../Common/PathUtil.h"
#include "TintedImage.h"
#include "ConfigParser.h"
#include "System.h"
@ -631,13 +632,7 @@ void TintedImage::ReadOptions(ConfigParser& parser, const WCHAR* section, const
std::wstring oldPath = m_Path;
m_Path = parser.ReadString(section, m_OptionArray[OptionIndexImagePath], imagePath);
if (!m_Path.empty())
{
if (!System::IsPathSeparator(m_Path[m_Path.length() - 1]))
{
m_Path += L'\\';
}
}
PathUtil::AppendBacklashIfMissing(m_Path);
m_HasPathChanged = (oldPath != m_Path);