From d4a1a4fadf38d157ea602b4cd440c2484ce6cb75 Mon Sep 17 00:00:00 2001 From: spx Date: Sun, 11 Apr 2010 14:30:31 +0000 Subject: [PATCH] Fixed a problem that an UNC path isn't recognized as an absolute path in @include statement. --- Library/ConfigParser.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Library/ConfigParser.cpp b/Library/ConfigParser.cpp index 69f5fdcb..c310421e 100644 --- a/Library/ConfigParser.cpp +++ b/Library/ConfigParser.cpp @@ -935,7 +935,8 @@ void CConfigParser::ReadIniFile(const std::wstring& iniFile, int depth) { std::wstring strIncludeFile = buffer; ReplaceVariables(strIncludeFile); - if (strIncludeFile.find(L':') == std::wstring::npos) + if (strIncludeFile.find(L':') == std::wstring::npos && + (strIncludeFile.length() < 2 || (strIncludeFile[0] != L'\\' && strIncludeFile[0] != L'/') || (strIncludeFile[1] != L'\\' && strIncludeFile[1] != L'/'))) { // It's a relative path so add the current path as a prefix strIncludeFile = CRainmeter::ExtractPath(iniFile) + strIncludeFile;