aboutsummaryrefslogtreecommitdiffstats
path: root/src/update.c
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2008-10-09 15:42:30 +0200
committerMax Kellermann <max@duempel.org>2008-10-09 15:42:30 +0200
commit2ae94fec6dccb9790b17a3472b69f70455a24247 (patch)
tree42885ccb062ebe8253f9bd8191d3ea73baeed16d /src/update.c
parent2bb7bcc7b6a12abd47c9cf56255045f5e78dba84 (diff)
downloadmpd-2ae94fec6dccb9790b17a3472b69f70455a24247.tar.gz
mpd-2ae94fec6dccb9790b17a3472b69f70455a24247.tar.xz
mpd-2ae94fec6dccb9790b17a3472b69f70455a24247.zip
update: clear root after error
When the root directory fails to update, its contents are invalid. Clear it then.
Diffstat (limited to '')
-rw-r--r--src/update.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/update.c b/src/update.c
index 36f866325..ddd3e27d1 100644
--- a/src/update.c
+++ b/src/update.c
@@ -408,6 +408,7 @@ static enum update_return updatePath(const char *utf8path)
/* we don't want to delete the root directory */
else if (directory == db_get_root()) {
free(path);
+ clear_directory(directory);
return UPDATE_RETURN_NOUPDATE;
}
/* if updateDirectory fails, means we should delete it */