aboutsummaryrefslogtreecommitdiffstats
path: root/src/update.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/update.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/update.c b/src/update.c
index 2bab75398..8bbb76eb1 100644
--- a/src/update.c
+++ b/src/update.c
@@ -141,7 +141,7 @@ statDirectory(struct directory *dir)
{
struct stat st;
- if (myStat(getDirectoryPath(dir), &st) < 0)
+ if (myStat(directory_get_path(dir), &st) < 0)
return -1;
directory_set_stat(dir, &st);
@@ -174,11 +174,11 @@ addSubDirectoryToDirectory(struct directory *directory,
if (inodeFoundInParent(directory, st->st_ino, st->st_dev))
return UPDATE_RETURN_NOUPDATE;
- subDirectory = newDirectory(name, directory);
+ subDirectory = directory_new(name, directory);
directory_set_stat(subDirectory, st);
if (updateDirectory(subDirectory) != UPDATE_RETURN_UPDATED) {
- freeDirectory(subDirectory);
+ directory_free(subDirectory);
return UPDATE_RETURN_NOUPDATE;
}
@@ -262,7 +262,7 @@ updateDirectory(struct directory *directory)
{
bool was_empty = directory_is_empty(directory);
DIR *dir;
- const char *dirname = getDirectoryPath(directory);
+ const char *dirname = directory_get_path(directory);
struct dirent *ent;
char path_max_tmp[MPD_PATH_MAX];
enum update_return ret = UPDATE_RETURN_NOUPDATE;
@@ -336,7 +336,7 @@ addDirectoryPathToDB(const char *utf8path)
inodeFoundInParent(parentDirectory, st.st_ino, st.st_dev))
return NULL;
else {
- directory = newDirectory(utf8path, parentDirectory);
+ directory = directory_new(utf8path, parentDirectory);
dirvec_add(&parentDirectory->children, directory);
}
}
@@ -392,7 +392,7 @@ static enum update_return updatePath(const char *utf8path)
ret = updateDirectory(directory);
if (ret != UPDATE_RETURN_ERROR) {
free(path);
- sortDirectory(directory);
+ directory_sort(directory);
return ret;
}
/* we don't want to delete the root directory */