From: Sup Yut Sum Date: Mon, 11 Feb 2013 02:35:48 +0000 (+0800) Subject: Fixed issue #1642: Incorrect behavior if repo is located on root of drive X-Git-Tag: REL_1.8.2.0_EXTERNAL~197 X-Git-Url: https://repo.or.cz/w/TortoiseGit.git/commitdiff_plain/c61639579a28ba4f6794da338f3f4a81937ea6c6 Fixed issue #1642: Incorrect behavior if repo is located on root of drive Signed-off-by: Sup Yut Sum --- diff --git a/src/Changelog.txt b/src/Changelog.txt index 292a01a8d..af7c45e13 100644 --- a/src/Changelog.txt +++ b/src/Changelog.txt @@ -10,6 +10,9 @@ Released: unreleased * Fixed issue #1597: Reduce chance of committing old submodule revision on cherry-pick / rebase conflicts * Can specify specific paths of submodules to update +== Bug Fixes == + * Fixed issue #1642: Incorrect behavior if repo is located on root of drive + = Release 1.8.1.0 = Released: 2013-02-07 diff --git a/src/Git/GitAdminDir.cpp b/src/Git/GitAdminDir.cpp index 6f27402a8..8bd780b42 100644 --- a/src/Git/GitAdminDir.cpp +++ b/src/Git/GitAdminDir.cpp @@ -77,6 +77,9 @@ bool GitAdminDir::HasAdminDir(const CString& path, bool bDir,CString *ProjectTop CString sDirName = path; if (!bDir) { + // e.g "C:\" + if (path.GetLength() <= 3) + return false; sDirName = path.Left(path.ReverseFind(_T('\\'))); }