From 71bf3ee8d932dc487922c1971c8160a30a7394b7 Mon Sep 17 00:00:00 2001
From: Jessica Hamilton <jessica.l.hamilton@gmail.com>
Date: Mon, 26 May 2014 07:44:29 +1200
Subject: [PATCH] MIME DB: Force setting BEOS:TYPE and META:TYPE for supertypes
---
src/kits/storage/mime/DatabaseLocation.cpp | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/src/kits/storage/mime/DatabaseLocation.cpp b/src/kits/storage/mime/DatabaseLocation.cpp
index ec31c1c..91f3809 100644
a
|
b
|
DatabaseLocation::_CreateTypeNode(const char* type, BNode& _node) const
|
836 | 836 | BDirectory superTypeDirectory; |
837 | 837 | if (BEntry(&parent, superTypeName).Exists()) |
838 | 838 | error = superTypeDirectory.SetTo(&parent, superTypeName); |
839 | | else |
| 839 | else { |
840 | 840 | error = parent.CreateDirectory(superTypeName, &superTypeDirectory); |
| 841 | superTypeDirectory.WriteAttr(kFileTypeAttr, kFileTypeType, 0, kMetaMimeType, strlen(kMetaMimeType)); |
| 842 | superTypeDirectory.WriteAttr(kTypeAttr, kTypeType, 0, superTypeName.String(), superTypeName.Length()); |
| 843 | |
| 844 | } |
841 | 845 | if (error != B_OK) |
842 | 846 | return error; |
843 | 847 | |