Resolve #10435.
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:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user