From 52365d1ff4a956061d2ab6a5f4d62121251e4235 Mon Sep 17 00:00:00 2001 From: Sven Strickroth Date: Sat, 25 Jan 2014 15:18:42 +0100 Subject: [PATCH] Return root path instead of always empty string Signed-off-by: Sven Strickroth --- src/TGitCache/DirectoryWatcher.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/TGitCache/DirectoryWatcher.cpp b/src/TGitCache/DirectoryWatcher.cpp index ce74f0f55..246e86c09 100644 --- a/src/TGitCache/DirectoryWatcher.cpp +++ b/src/TGitCache/DirectoryWatcher.cpp @@ -1,7 +1,7 @@ // TortoiseGit - a Windows shell extension for easy version control // External Cache Copyright (C) 2005-2008, 2011-2012 - TortoiseSVN -// Copyright (C) 2008-2013 - TortoiseGit +// Copyright (C) 2008-2014 - TortoiseGit // This program is free software; you can redistribute it and/or // modify it under the terms of the GNU General Public License @@ -577,17 +577,17 @@ void CDirectoryWatcher::ClearInfoMap() CTGitPath CDirectoryWatcher::CloseInfoMap(HANDLE hDir) { + CTGitPath path; AutoLocker lock(m_critSec); TInfoMap::const_iterator d = watchInfoMap.find(hDir); if (d != watchInfoMap.end()) { - CTGitPath root = CTGitPath(CTGitPath(d->second->m_DirPath).GetRootPathString()); - RemovePathAndChildren(root); - BlockPath(root); + path = CTGitPath(CTGitPath(d->second->m_DirPath).GetRootPathString()); + RemovePathAndChildren(path); + BlockPath(path); } CloseWatchHandles(); - CTGitPath path; if (watchInfoMap.empty()) return path; -- 2.11.4.GIT