summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEdward Thomson <ethomson@microsoft.com>2014-12-18 12:41:59 -0600
committerEdward Thomson <ethomson@edwardthomson.com>2014-12-18 19:18:28 +0000
commite476e7beba01efc496ba880f463a8ac61f948270 (patch)
treeaa97613b28d9afde533da1b44aa308819cb5beea
parent90fad07d058bbf86eb336f31908382fbde506678 (diff)
downloadlibgit2-hf/021_patch.tar.gz
index tests: test capitalization before mkdirv0.21.3hf/021_patch
-rw-r--r--tests/index/tests.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/tests/index/tests.c b/tests/index/tests.c
index e9e0a0840..42f448368 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");