diff options
author | Igor Pavlov <ipavlov@users.sourceforge.net> | 2008-08-19 04:00:00 +0400 |
---|---|---|
committer | Kornel LesiĆski <kornel@geekhood.net> | 2016-05-28 02:15:57 +0300 |
commit | c10e6b16f6d5484ed896b2c614cb7fb77f336d24 (patch) | |
tree | f7a2ac132f883d95c2cf28ab01d58963de1ee811 /CPP/7zip/UI/FileManager/RootFolder.cpp | |
parent | 173c07e166fdf6fcd20f18ea73008f1b628945df (diff) |
4.60 beta
Diffstat (limited to 'CPP/7zip/UI/FileManager/RootFolder.cpp')
-rwxr-xr-x | CPP/7zip/UI/FileManager/RootFolder.cpp | 20 |
1 files changed, 8 insertions, 12 deletions
diff --git a/CPP/7zip/UI/FileManager/RootFolder.cpp b/CPP/7zip/UI/FileManager/RootFolder.cpp index 3f3c67ef..0dec5412 100755 --- a/CPP/7zip/UI/FileManager/RootFolder.cpp +++ b/CPP/7zip/UI/FileManager/RootFolder.cpp @@ -95,8 +95,8 @@ UString GetMyDocsPath() us = GetUnicodeString(s2); } #endif - if (us.Length() > 0 && us[us.Length() - 1] != L'\\') - us += L'\\'; + if (us.Length() > 0 && us[us.Length() - 1] != WCHAR_PATH_SEPARATOR) + us += WCHAR_PATH_SEPARATOR; return us; } @@ -113,7 +113,7 @@ STDMETHODIMP CRootFolder::BindToFolder(UInt32 index, IFolderFolder **resultFolde { CNetFolder *netFolderSpec = new CNetFolder; CMyComPtr<IFolderFolder> subFolder = netFolderSpec; - netFolderSpec->Init(0, 0, _names[ROOT_INDEX_NETWORK] + L'\\'); + netFolderSpec->Init(0, 0, _names[ROOT_INDEX_NETWORK] + WCHAR_PATH_SEPARATOR); *resultFolder = subFolder.Detach(); } else if (index == ROOT_INDEX_DOCUMENTS) @@ -134,7 +134,7 @@ STDMETHODIMP CRootFolder::BindToFolder(UInt32 index, IFolderFolder **resultFolde static bool AreEqualNames(const UString &name1, const UString &name2) { - return (name1 == name2 || name1 == (name2 + UString(L'\\'))); + return (name1 == name2 || name1 == (name2 + UString(WCHAR_PATH_SEPARATOR))); } STDMETHODIMP CRootFolder::BindToFolder(const wchar_t *name, IFolderFolder **resultFolder) @@ -159,7 +159,7 @@ STDMETHODIMP CRootFolder::BindToFolder(const wchar_t *name, IFolderFolder **resu if (AreEqualNames(name2, L"My Computer") || AreEqualNames(name2, L"Computer")) return BindToFolder((UInt32)ROOT_INDEX_COMPUTER, resultFolder); - if (name2 == UString(L'\\')) + if (name2 == UString(WCHAR_PATH_SEPARATOR)) { CMyComPtr<IFolderFolder> subFolder = this; *resultFolder = subFolder.Detach(); @@ -179,13 +179,13 @@ STDMETHODIMP CRootFolder::BindToFolder(const wchar_t *name, IFolderFolder **resu } else { - if (name2[name2.Length () - 1] != L'\\') - name2 += L'\\'; + if (name2[name2.Length () - 1] != WCHAR_PATH_SEPARATOR) + name2 += WCHAR_PATH_SEPARATOR; NFsFolder::CFSFolder *fsFolderSpec = new NFsFolder::CFSFolder; subFolder = fsFolderSpec; if (fsFolderSpec->Init(name2, 0) != S_OK) { - if (name2[0] == L'\\') + if (name2[0] == WCHAR_PATH_SEPARATOR) { CNetFolder *netFolderSpec = new CNetFolder; subFolder = netFolderSpec; @@ -240,7 +240,3 @@ STDMETHODIMP CRootFolder::GetSystemIconIndex(UInt32 index, INT32 *iconIndex) *iconIndex = _iconIndices[index]; return S_OK; } - - - - |