Adjust Database{Location} to only attempt to create a mimetype when
actually necessary, and fail otherwise if a writable version doesn't yet
exist. Correspondingly, adjust callers such as
DatabaseLocation::DeleteAttribute(). Fixes a problem where a caller asking
to perform a mimeset could fail early due to SetSupportedTypes() attempting
to update the read-only mime database entry supplied by a package, and
consequently most of the mimeset operations would be skipped.
This commit is contained in:
Rene Gollent
2014-01-20 20:52:32 -05:00
parent d56476656e
commit 701a5d6b79
4 changed files with 36 additions and 34 deletions
@@ -38,9 +38,9 @@ public:
// opening type nodes
status_t OpenType(const char* type, BNode& _node) const;
status_t OpenOrCreateType(const char* type,
BNode& _node, bool* _didCreate = NULL)
const;
status_t OpenWritableType(const char* type,
BNode& _node, bool create,
bool* _didCreate = NULL) const;
// generic type attributes access