diff options
author | Russell Belfer <rb@github.com> | 2013-08-13 20:53:56 +0400 |
---|---|---|
committer | Russell Belfer <rb@github.com> | 2013-08-13 20:53:56 +0400 |
commit | ee0656012c213a9589c7a0892f3e4a11caebc664 (patch) | |
tree | 1789c273dfb4a4cb06fd1a714b2a66c15b466f18 /src/path.c | |
parent | 841034a35ee34190fa1cc136acccfa1a4abaed39 (diff) |
Minor win32 fixes and improvements
This is just a bunch of small fixes that I noticed while looking
at the UTF8 and UTF16 path stuff. It fixes a slowdown in looking
for an empty directory (not exiting loop asap), makes the dir name
in the git__DIR structure be a GIT_FLEX_ARRAY to save an allocation,
and fixes some slightly odd assumptions in the cl_getenv helper.
Diffstat (limited to 'src/path.c')
-rw-r--r-- | src/path.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/path.c b/src/path.c index 9a4b8c413..d64a5b33e 100644 --- a/src/path.c +++ b/src/path.c @@ -497,12 +497,14 @@ bool git_path_is_empty_dir(const char *path) hFind = FindFirstFileW(wbuf, &ffd); if (INVALID_HANDLE_VALUE == hFind) { giterr_set(GITERR_OS, "Couldn't open '%s'", path); + git_buf_free(&pathbuf); return false; } do { if (!git_path_is_dot_or_dotdotW(ffd.cFileName)) { retval = false; + break; } } while (FindNextFileW(hFind, &ffd) != 0); |