summaryrefslogtreecommitdiff
path: root/zen/long_path_prefix.h
diff options
context:
space:
mode:
authorDaniel Wilhelm <daniel@wili.li>2015-10-02 14:54:34 +0200
committerDaniel Wilhelm <daniel@wili.li>2015-10-02 14:54:34 +0200
commit96e20826f358a32e38c3f052243375982543c05b (patch)
tree691efa86265fbb35cc60a1ce816423bb2a41f17b /zen/long_path_prefix.h
parent6.13 (diff)
downloadFreeFileSync-96e20826f358a32e38c3f052243375982543c05b.tar.gz
FreeFileSync-96e20826f358a32e38c3f052243375982543c05b.tar.bz2
FreeFileSync-96e20826f358a32e38c3f052243375982543c05b.zip
6.14
Diffstat (limited to 'zen/long_path_prefix.h')
-rw-r--r--zen/long_path_prefix.h13
1 files changed, 2 insertions, 11 deletions
diff --git a/zen/long_path_prefix.h b/zen/long_path_prefix.h
index d2289330..19b838ef 100644
--- a/zen/long_path_prefix.h
+++ b/zen/long_path_prefix.h
@@ -47,15 +47,6 @@ As used by GetModuleFileNameEx() and symlinks (FSCTL_GET_REPARSE_POINT):
-
-
-
-
-
-
-
-
-
//################## implementation ##################
//there are two flavors of long path prefix: one for UNC paths, one for regular paths
@@ -128,11 +119,11 @@ Zstring zen::ntPathToWin32Path(const Zstring& path) //noexcept
if (bufSize > 0)
{
std::vector<wchar_t> buf(bufSize);
- DWORD charsWritten = ::GetEnvironmentVariable(L"SystemRoot", //_In_opt_ LPCTSTR lpName,
+ const DWORD charsWritten = ::GetEnvironmentVariable(L"SystemRoot", //_In_opt_ LPCTSTR lpName,
&buf[0], //_Out_opt_ LPTSTR lpBuffer,
bufSize); //_In_ DWORD nSize
- if (charsWritten != 0 && charsWritten < bufSize)
+ if (0 < charsWritten && charsWritten < bufSize)
return replaceCpy(path, L"\\SystemRoot\\", appendSeparator(Zstring(&buf[0], charsWritten)), false);
}
}
bgstack15