directory: simplify constructors and clarify API documentation

Pass only the "name" to a directory, instead of the full (relative)
path.
This commit is contained in:
Max Kellermann
2012-01-24 19:07:11 +01:00
parent 1bab735580
commit 420a4c163d
5 changed files with 111 additions and 76 deletions

View File

@@ -199,7 +199,7 @@ simple_db_open(struct db *_db, G_GNUC_UNUSED GError **error_r)
{
struct simple_db *db = (struct simple_db *)_db;
db->root = directory_new("", NULL);
db->root = directory_new_root();
db->mtime = 0;
GError *error = NULL;
@@ -212,7 +212,7 @@ simple_db_open(struct db *_db, G_GNUC_UNUSED GError **error_r)
if (!simple_db_check(db, error_r))
return false;
db->root = directory_new("", NULL);
db->root = directory_new_root();
}
return true;