Minor tweaks and cleanup.

This commit is contained in:
spx
2011-11-05 09:01:06 +00:00
parent f945bacfb7
commit 2a166b520f
6 changed files with 46 additions and 45 deletions

View File

@ -5094,9 +5094,7 @@ std::wstring CMeterWindow::MakePathAbsolute(const std::wstring& path)
{
std::wstring absolute;
if (path.empty() ||
path.find(L":\\") != std::wstring::npos || path.find(L":/") != std::wstring::npos ||
(path.length() >= 2 && (path[0] == L'\\' || path[0] == L'/') && (path[1] == L'\\' || path[1] == L'/'))) // UNC
if (path.empty() || CSystem::IsAbsolutePath(path))
{
absolute = path; // It's already absolute path (or it's empty)
}