Commit 280f921b7f983840bfb1f82e25c054ce55034924

Stefan Sperling 2019-05-12T15:30:43

heed API namespace: got_dir_is_empty -> got_path_dir_is_empty

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;