diff options
author | Edward Thomson <ethomson@microsoft.com> | 2014-12-18 12:41:59 -0600 |
---|---|---|
committer | Edward Thomson <ethomson@microsoft.com> | 2014-12-18 12:41:59 -0600 |
commit | 284283180003a085ce03fb8fac2550a7ac9b9eb0 (patch) | |
tree | ca8a7995b2add6989d01e38adb311775b604404c /tests/index/tests.c | |
parent | c90ed5b5583ab62f31cca55f4d9ea4386600e2a3 (diff) | |
download | libgit2-284283180003a085ce03fb8fac2550a7ac9b9eb0.tar.gz |
index tests: test capitalization before mkdirhf/master_patch
Diffstat (limited to 'tests/index/tests.c')
-rw-r--r-- | tests/index/tests.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/tests/index/tests.c b/tests/index/tests.c index d0372f169..a63183e10 100644 --- a/tests/index/tests.c +++ b/tests/index/tests.c @@ -340,8 +340,10 @@ void test_index_tests__add_invalid_filename(void) cl_must_pass(p_mkdir("./invalid/subdir", 0777)); /* cl_git_mkfile() needs the dir to exist */ - cl_must_pass(p_mkdir("./invalid/.GIT", 0777)); - cl_must_pass(p_mkdir("./invalid/.GiT", 0777)); + if (!git_path_exists("./invalid/.GIT")) + cl_must_pass(p_mkdir("./invalid/.GIT", 0777)); + if (!git_path_exists("./invalid/.GiT")) + cl_must_pass(p_mkdir("./invalid/.GiT", 0777)); add_invalid_filename(repo, ".git/hello"); add_invalid_filename(repo, ".GIT/hello"); |