BAppFileInfo::SetSupportedTypes now works even when there is no signature
A consequence is the FileType tracker addon (which hasn't a signature) has now its attributes set on Linux builds git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17642 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
7a04ba9b1d
commit
7f20062d97
|
@ -445,7 +445,8 @@ BAppFileInfo::SetSupportedTypes(const BMessage *types, bool syncAll)
|
|||
BMimeType mimeType;
|
||||
if (error == B_OK)
|
||||
error = GetMetaMime(&mimeType);
|
||||
if (error == B_OK) {
|
||||
if (error == B_OK || error == B_ENTRY_NOT_FOUND) {
|
||||
error = B_OK;
|
||||
if (types) {
|
||||
// check param -- supported types must be valid
|
||||
const char *type;
|
||||
|
@ -1031,6 +1032,8 @@ BAppFileInfo::GetMetaMime(BMimeType *meta) const
|
|||
status_t error = GetSignature(signature);
|
||||
if (error == B_OK)
|
||||
error = meta->SetTo(signature);
|
||||
else if (error == B_BAD_VALUE)
|
||||
error = B_ENTRY_NOT_FOUND;
|
||||
if (error == B_OK && !meta->IsValid())
|
||||
error = B_BAD_VALUE;
|
||||
return error;
|
||||
|
|
|
@ -458,7 +458,8 @@ BAppFileInfo::SetSupportedTypes(const BMessage *types, bool syncAll)
|
|||
BMimeType mimeType;
|
||||
if (error == B_OK)
|
||||
error = GetMetaMime(&mimeType);
|
||||
if (error == B_OK) {
|
||||
if (error == B_OK || error == B_ENTRY_NOT_FOUND) {
|
||||
error = B_OK;
|
||||
if (types) {
|
||||
// check param -- supported types must be valid
|
||||
const char *type;
|
||||
|
@ -1044,6 +1045,8 @@ BAppFileInfo::GetMetaMime(BMimeType *meta) const
|
|||
status_t error = GetSignature(signature);
|
||||
if (error == B_OK)
|
||||
error = meta->SetTo(signature);
|
||||
else if (error == B_BAD_VALUE)
|
||||
error = B_ENTRY_NOT_FOUND;
|
||||
if (error == B_OK && !meta->IsValid())
|
||||
error = B_BAD_VALUE;
|
||||
return error;
|
||||
|
|
Loading…
Reference in New Issue