From 6551a62fba42d4c157849f313f083d74028bf6c1 Mon Sep 17 00:00:00 2001 From: spx Date: Tue, 6 Apr 2010 17:46:17 +0000 Subject: [PATCH] Fixed a problem that an UNC path isn't recognized as an absolute path. --- Library/MeterWindow.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Library/MeterWindow.cpp b/Library/MeterWindow.cpp index e82ae7e2..b8204de9 100644 --- a/Library/MeterWindow.cpp +++ b/Library/MeterWindow.cpp @@ -4017,7 +4017,9 @@ LRESULT CMeterWindow::OnCopyData(WPARAM wParam, LPARAM lParam) */ std::wstring CMeterWindow::MakePathAbsolute(std::wstring path) { - if (path.empty() || path.find(L':') != std::wstring::npos) + 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 { return path; // It's already absolute path (or it's empty) }