diff --git a/Common/PathUtil.cpp b/Common/PathUtil.cpp index b3f984664..201d095e7 100644 --- a/Common/PathUtil.cpp +++ b/Common/PathUtil.cpp @@ -32,7 +32,7 @@ bool IsAbsolute(const std::wstring& path) IsUNC(path)); } -void AppendBacklashIfMissing(std::wstring& path) +void AppendBackslashIfMissing(std::wstring& path) { if (!path.empty() && !IsSeparator(path[path.length() - 1])) { diff --git a/Common/PathUtil.h b/Common/PathUtil.h index 1337dc63b..d49b08656 100644 --- a/Common/PathUtil.h +++ b/Common/PathUtil.h @@ -21,7 +21,7 @@ bool IsUNC(const std::wstring& path); bool IsAbsolute(const std::wstring& path); -void AppendBacklashIfMissing(std::wstring& path); +void AppendBackslashIfMissing(std::wstring& path); void RemoveTrailingBackslash(std::wstring& path); diff --git a/Common/PathUtil_Test.cpp b/Common/PathUtil_Test.cpp index 5f699a085..12db35db6 100644 --- a/Common/PathUtil_Test.cpp +++ b/Common/PathUtil_Test.cpp @@ -43,18 +43,18 @@ TEST_CLASS(Common_PathUtil_Test) Assert::IsFalse(IsAbsolute(L"C:")); } - TEST_METHOD(TestAppendBacklashIfMissing) + TEST_METHOD(TestAppendBackslashIfMissing) { std::wstring path; - AppendBacklashIfMissing(path); + AppendBackslashIfMissing(path); Assert::IsTrue(path.empty()); std::wstring path2 = L"C:\\test"; - AppendBacklashIfMissing(path2); + AppendBackslashIfMissing(path2); Assert::IsTrue(path2 == L"C:\\test\\"); std::wstring path3 = L"C:\\test\\"; - AppendBacklashIfMissing(path3); + AppendBackslashIfMissing(path3); Assert::IsTrue(path3 == L"C:\\test\\"); } diff --git a/Library/DialogNewSkin.cpp b/Library/DialogNewSkin.cpp index a0563443d..60f2fe015 100644 --- a/Library/DialogNewSkin.cpp +++ b/Library/DialogNewSkin.cpp @@ -579,7 +579,7 @@ INT_PTR DialogNewSkin::TabNew::OnCommand(WPARAM wParam, LPARAM lParam) { HWND tree = GetControl(Id_ItemsTreeView); std::wstring folder = m_ParentFolder + GetTreeSelectionPath(tree, false); - PathUtil::AppendBacklashIfMissing(folder); + PathUtil::AppendBackslashIfMissing(folder); CommandHandler::RunFile(folder.c_str()); } break; @@ -850,7 +850,7 @@ INT_PTR DialogNewSkin::TabNew::OnNotify(WPARAM wParam, LPARAM lParam) // Add selection to item newItem += GetTreeSelectionPath(tree, false); - PathUtil::AppendBacklashIfMissing(newItem); + PathUtil::AppendBackslashIfMissing(newItem); if (isFolder) { @@ -874,7 +874,7 @@ INT_PTR DialogNewSkin::TabNew::OnNotify(WPARAM wParam, LPARAM lParam) newItem = newItem.substr(0, pos + 1); newItem += name; - PathUtil::AppendBacklashIfMissing(newItem); + PathUtil::AppendBackslashIfMissing(newItem); // New folder already exists, re-enter folder name if (_waccess(newItem.c_str(), 0) == 0) diff --git a/Library/MeasureDiskSpace.cpp b/Library/MeasureDiskSpace.cpp index c6373f636..7a60a4be2 100644 --- a/Library/MeasureDiskSpace.cpp +++ b/Library/MeasureDiskSpace.cpp @@ -173,7 +173,7 @@ void MeasureDiskSpace::ReadOptions(ConfigParser& parser, const WCHAR* section) else { // A trailing backslash is required for GetDiskFreeSpaceEx(). - PathUtil::AppendBacklashIfMissing(m_Drive); + PathUtil::AppendBackslashIfMissing(m_Drive); } m_Type = parser.ReadBool(section, L"Type", false); diff --git a/Library/MeterImage.cpp b/Library/MeterImage.cpp index 26c86a240..c252b5519 100644 --- a/Library/MeterImage.cpp +++ b/Library/MeterImage.cpp @@ -129,7 +129,7 @@ void MeterImage::ReadOptions(ConfigParser& parser, const WCHAR* section) // Deprecated! std::wstring path = parser.ReadString(section, L"Path", L""); - PathUtil::AppendBacklashIfMissing(path); + PathUtil::AppendBackslashIfMissing(path); // Read tinting options m_Image.ReadOptions(parser, section, path.c_str()); diff --git a/Library/Rainmeter.cpp b/Library/Rainmeter.cpp index 67b04d868..d83a3b7fa 100644 --- a/Library/Rainmeter.cpp +++ b/Library/Rainmeter.cpp @@ -331,7 +331,7 @@ int Rainmeter::Initialize(LPCWSTR iniPath, LPCWSTR layout) // Try Rainmeter.ini first m_SkinPath.assign(buffer, len); PathUtil::ExpandEnvironmentVariables(m_SkinPath); - PathUtil::AppendBacklashIfMissing(m_SkinPath); + PathUtil::AppendBackslashIfMissing(m_SkinPath); } else if (bDefaultIniLocation && SUCCEEDED(SHGetFolderPath(nullptr, CSIDL_MYDOCUMENTS, nullptr, SHGFP_TYPE_CURRENT, buffer))) diff --git a/Library/TintedImage.cpp b/Library/TintedImage.cpp index 53536e046..c5c6266e2 100644 --- a/Library/TintedImage.cpp +++ b/Library/TintedImage.cpp @@ -615,7 +615,7 @@ void TintedImage::ReadOptions(ConfigParser& parser, const WCHAR* section, const std::wstring oldPath = m_Path; m_Path = parser.ReadString(section, m_OptionArray[OptionIndexImagePath], imagePath); - PathUtil::AppendBacklashIfMissing(m_Path); + PathUtil::AppendBackslashIfMissing(m_Path); m_HasPathChanged = (oldPath != m_Path);