diff options
Diffstat (limited to 'tests/t18-status.c')
| -rw-r--r-- | tests/t18-status.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/tests/t18-status.c b/tests/t18-status.c index 73e328c2c..3799dc2ab 100644 --- a/tests/t18-status.c +++ b/tests/t18-status.c @@ -392,15 +392,15 @@ END_TEST BEGIN_TEST(singlestatus3, "test retrieving status for a new file in an empty repository") git_repository *repo; unsigned int status_flags; - char file_path[GIT_PATH_MAX]; + git_buf file_path = GIT_BUF_INIT; char filename[] = "new_file"; int fd; must_pass(copydir_recurs(EMPTY_REPOSITORY_FOLDER, TEST_STD_REPO_FOLDER)); must_pass(remove_placeholders(TEST_STD_REPO_FOLDER, "dummy-marker.txt")); - git_path_join(file_path, TEMP_REPO_FOLDER, filename); - fd = p_creat(file_path, 0666); + must_pass(git_buf_joinpath(&file_path, TEMP_REPO_FOLDER, filename)); + fd = p_creat(file_path.ptr, 0666); must_pass(fd); must_pass(p_write(fd, "new_file\n", 9)); must_pass(p_close(fd)); @@ -411,6 +411,7 @@ BEGIN_TEST(singlestatus3, "test retrieving status for a new file in an empty rep must_be_true(status_flags == GIT_STATUS_WT_NEW); git_repository_free(repo); + git_buf_free(&file_path); git_futils_rmdir_r(TEMP_REPO_FOLDER, 1); END_TEST |
