From be0184bbe991e47c38eb0b9fdd63bdac731aca9d Mon Sep 17 00:00:00 2001 From: Jack Andersen Date: Sun, 27 Mar 2016 18:39:50 -1000 Subject: [PATCH] Ensure Windows ProjectPath hash will match POSIX --- hecl/lib/ProjectPath.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/hecl/lib/ProjectPath.cpp b/hecl/lib/ProjectPath.cpp index 3d44e47f5..56d0b55fd 100644 --- a/hecl/lib/ProjectPath.cpp +++ b/hecl/lib/ProjectPath.cpp @@ -67,11 +67,13 @@ void ProjectPath::assign(Database::Project& project, const SystemString& path) m_absPath = project.getProjectRootPath().getAbsolutePath() + _S('/') + m_relPath; SanitizePath(m_relPath); SanitizePath(m_absPath); - m_hash = Hash(m_relPath); #if HECL_UCS2 m_utf8AbsPath = WideToUTF8(m_absPath); m_utf8RelPath = WideToUTF8(m_relPath); + m_hash = Hash(m_utf8RelPath); +#else + m_hash = Hash(m_relPath); #endif } @@ -97,11 +99,13 @@ void ProjectPath::assign(const ProjectPath& parentPath, const SystemString& path m_absPath = m_proj->getProjectRootPath().getAbsolutePath() + _S('/') + m_relPath; SanitizePath(m_relPath); SanitizePath(m_absPath); - m_hash = Hash(m_relPath); #if HECL_UCS2 m_utf8AbsPath = WideToUTF8(m_absPath); m_utf8RelPath = WideToUTF8(m_relPath); + m_hash = Hash(m_utf8RelPath); +#else + m_hash = Hash(m_relPath); #endif }