diff options
author | Daniel Wilhelm <daniel@wili.li> | 2014-04-18 17:12:17 +0200 |
---|---|---|
committer | Daniel Wilhelm <daniel@wili.li> | 2014-04-18 17:12:17 +0200 |
commit | b654dbfa5f3e4a4d02f72023f7c5895635aa6396 (patch) | |
tree | 8c1dfe7f638c0fc7afc1d08bc2fc0fd0f8646e5e /shared/resolve_path.cpp | |
parent | 3.17 (diff) | |
download | FreeFileSync-b654dbfa5f3e4a4d02f72023f7c5895635aa6396.tar.gz FreeFileSync-b654dbfa5f3e4a4d02f72023f7c5895635aa6396.tar.bz2 FreeFileSync-b654dbfa5f3e4a4d02f72023f7c5895635aa6396.zip |
3.18
Diffstat (limited to 'shared/resolve_path.cpp')
-rw-r--r-- | shared/resolve_path.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/shared/resolve_path.cpp b/shared/resolve_path.cpp index 1fdc2430..95c84e1a 100644 --- a/shared/resolve_path.cpp +++ b/shared/resolve_path.cpp @@ -211,7 +211,7 @@ Zstring getVolumePath(const Zstring& volumeName) //empty string on error std::vector<wchar_t> volPath(10000); DWORD returnedLen = 0; - if (getVolumePathNamesForVolumeName(&volGuid[0], //__in LPCTSTR lpszVolumeName, + if (getVolumePathNamesForVolumeName(&volGuid[0], //__in LPCTSTR lpszVolumeName, &volPath[0], //__out LPTSTR lpszVolumePathNames, static_cast<DWORD>(volPath.size()), //__in DWORD cchBufferLength, &returnedLen)) //__out PDWORD lpcchReturnLength @@ -258,10 +258,10 @@ void expandVolumeName(Zstring& text) // [volname]:\folder [volname]\folde volname = Zstring(text.c_str() + posStart + 1, posEnd - posStart - 1); after = Zstring(text.c_str() + posEnd + 1); - if (after.StartsWith(Zstr(":"))) - after = after.AfterFirst(Zstr(':')); - if (after.StartsWith(Zstring() + FILE_NAME_SEPARATOR)) - after = after.AfterFirst(FILE_NAME_SEPARATOR); + if (startsWith(after, ':')) + after = afterFirst(after, ':'); + if (startsWith(after, FILE_NAME_SEPARATOR)) + after = afterFirst(after, FILE_NAME_SEPARATOR); } } @@ -294,7 +294,7 @@ Zstring zen::getFormattedDirectoryName(const Zstring& dirname) //remove leading/trailing whitespace trim(output, true, false); - while (endsWith(output, Zstr(" "))) //don't remove all whitespace from right, e.g. 0xa0 may be used as part of dir name + while (endsWith(output, " ")) //don't remove all whitespace from right, e.g. 0xa0 may be used as part of dir name output.resize(output.size() - 1); if (output.empty()) //an empty string will later be returned as "\"; this is not desired |