Commit 2ae94fec authored by Max Kellermann's avatar Max Kellermann

update: clear root after error

When the root directory fails to update, its contents are invalid. Clear it then.
parent 2bb7bcc7
......@@ -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 */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment