heed API namespace: got_dir_is_empty -> got_path_dir_is_empty
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39
diff --git a/got/got.c b/got/got.c
index 3d3ea43..8e3450b 100644
--- a/got/got.c
+++ b/got/got.c
@@ -205,7 +205,7 @@ apply_unveil(const char *repo_path, int repo_read_only,
error = got_path_mkdir(worktree_path);
if (errno == EEXIST) {
- if (got_dir_is_empty(worktree_path)) {
+ if (got_path_dir_is_empty(worktree_path)) {
errno = 0;
error = NULL;
} else {
diff --git a/include/got_path.h b/include/got_path.h
index b80b464..c7b7e0f 100644
--- a/include/got_path.h
+++ b/include/got_path.h
@@ -91,7 +91,7 @@ void got_pathlist_free(struct got_pathlist_head *);
const struct got_error *got_path_mkdir(const char *);
/* Determine whether a directory has no files or directories in it. */
-int got_dir_is_empty(const char *);
+int got_path_dir_is_empty(const char *);
/* dirname(3) with error handling and dynamically allocated result. */
const struct got_error *got_path_dirname(char **, const char *);
diff --git a/lib/path.c b/lib/path.c
index abd5d7f..9a681d1 100644
--- a/lib/path.c
+++ b/lib/path.c
@@ -327,7 +327,7 @@ done:
}
int
-got_dir_is_empty(const char *dir)
+got_path_dir_is_empty(const char *dir)
{
DIR *d;
struct dirent *dent;