update: clear root after error

When the root directory fails to update, its contents are invalid.
Clear it then.
This commit is contained in:
Max Kellermann 2008-10-09 15:42:30 +02:00
parent 2bb7bcc7b6
commit 2ae94fec6d

View File

@ -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 */