From 89e2b2ba27e6202f15f34f657807dc5a4958d80f Mon Sep 17 00:00:00 2001 From: Sven Strickroth Date: Sat, 24 Dec 2016 01:28:42 +0100 Subject: [PATCH] Fix check for valid handle Signed-off-by: Sven Strickroth --- src/TGitCache/DirectoryWatcher.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/TGitCache/DirectoryWatcher.cpp b/src/TGitCache/DirectoryWatcher.cpp index 8cf940f6e..98d2449ae 100644 --- a/src/TGitCache/DirectoryWatcher.cpp +++ b/src/TGitCache/DirectoryWatcher.cpp @@ -337,7 +337,7 @@ void CDirectoryWatcher::WorkerThread() HANDLE port = CreateIoCompletionPort(pDirInfo->m_hDir, m_hCompPort, (ULONG_PTR)pDirInfo, 0); - if (!port) + if (port == INVALID_HANDLE_VALUE) { CTraceToOutputDebugString::Instance()(_T(__FUNCTION__) L": CreateIoCompletionPort failed. Can't watch directory %s\n", watchedPath.GetWinPath()); -- 2.11.4.GIT