diff options
| -rw-r--r-- | tests/t12-repo.c | 1 | ||||
| -rw-r--r-- | tests/test_helpers.c | 9 |
2 files changed, 2 insertions, 8 deletions
diff --git a/tests/t12-repo.c b/tests/t12-repo.c index 9b8933f54..38e350958 100644 --- a/tests/t12-repo.c +++ b/tests/t12-repo.c @@ -196,7 +196,6 @@ BEGIN_TEST(open2, "Open a bare repository with a relative path escaping out of t must_pass(gitfo_getcwd(current_workdir, sizeof(current_workdir))); strcpy(path_repository, current_workdir); git__joinpath_n(path_repository, 3, path_repository, TEMP_REPO_FOLDER, "a/d/e.git"); - must_pass(gitfo_mkdir_recurs(path_repository, mode)); must_pass(copydir_recurs(REPOSITORY_FOLDER, path_repository)); /* Change the current working directory */ diff --git a/tests/test_helpers.c b/tests/test_helpers.c index 588461135..1d345356a 100644 --- a/tests/test_helpers.c +++ b/tests/test_helpers.c @@ -141,7 +141,7 @@ int copy_file(const char *src, const char *dst) if (gitfo_read_file(&source_buf, src) < GIT_SUCCESS) return GIT_ENOTFOUND; - dst_fd = gitfo_creat(dst, 0644); + dst_fd = gitfo_creat_force(dst, 0644); if (dst_fd < 0) goto cleanup; @@ -211,18 +211,13 @@ typedef struct { static int copy_filesystem_element_recurs(void *_data, char *source) { - const int mode = 0755; /* or 0777 ? */ copydir_data *data = (copydir_data *)_data; data->dst[data->dst_len] = 0; git__joinpath(data->dst, data->dst, source + data->src_len); - if (gitfo_isdir(source) == GIT_SUCCESS) { - if (gitfo_mkdir(data->dst, mode) < GIT_SUCCESS) - return GIT_EOSERR; - + if (gitfo_isdir(source) == GIT_SUCCESS) return gitfo_dirent(source, GIT_PATH_MAX, copy_filesystem_element_recurs, _data); - } return copy_file(source, data->dst); } |
