mirror of
https://github.com/chibicitiberiu/rainmeter-studio.git
synced 2024-02-24 04:33:31 +00:00
Fixed a problem that an UNC path isn't recognized as an absolute path.
This commit is contained in:
parent
68ec1714c1
commit
6551a62fba
@ -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)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user