It no longer appears as if you need to delete file types twice until they
disappear. This fixes a part of bug #279. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16988 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -7,12 +7,12 @@
|
|||||||
* Axel Dörfler, [email protected]
|
* Axel Dörfler, [email protected]
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*!
|
|
||||||
\file Database.cpp
|
|
||||||
Database class implementation
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include "mime/Database.h"
|
#include <mime/Database.h>
|
||||||
|
|
||||||
|
#include <mime/database_access.h>
|
||||||
|
#include <mime/database_support.h>
|
||||||
|
#include <storage_support.h>
|
||||||
|
|
||||||
#include <Application.h>
|
#include <Application.h>
|
||||||
#include <Bitmap.h>
|
#include <Bitmap.h>
|
||||||
@@ -21,13 +21,10 @@
|
|||||||
#include <Entry.h>
|
#include <Entry.h>
|
||||||
#include <Locker.h>
|
#include <Locker.h>
|
||||||
#include <Message.h>
|
#include <Message.h>
|
||||||
#include <mime/database_access.h>
|
|
||||||
#include <mime/database_support.h>
|
|
||||||
#include <MimeType.h>
|
#include <MimeType.h>
|
||||||
#include <Node.h>
|
#include <Node.h>
|
||||||
#include <Path.h>
|
#include <Path.h>
|
||||||
#include <String.h>
|
#include <String.h>
|
||||||
#include <storage_support.h>
|
|
||||||
#include <TypeConstants.h>
|
#include <TypeConstants.h>
|
||||||
|
|
||||||
#include <fs_attr.h>
|
#include <fs_attr.h>
|
||||||
@@ -171,15 +168,14 @@ Database::Delete(const char *type)
|
|||||||
|
|
||||||
status = entry.Remove();
|
status = entry.Remove();
|
||||||
|
|
||||||
// Notify the installed types database
|
if (status == B_OK) {
|
||||||
if (status != B_OK)
|
// Notify the installed types database
|
||||||
fInstalledTypes.RemoveType(type);
|
fInstalledTypes.RemoveType(type);
|
||||||
// Notify the supporting apps database
|
// Notify the supporting apps database
|
||||||
if (status != B_OK)
|
|
||||||
fSupportingApps.DeleteSupportedTypes(type, true);
|
fSupportingApps.DeleteSupportedTypes(type, true);
|
||||||
// Notify the monitor service
|
// Notify the monitor service
|
||||||
if (status != B_OK)
|
|
||||||
_SendDeleteNotification(type);
|
_SendDeleteNotification(type);
|
||||||
|
}
|
||||||
|
|
||||||
return status;
|
return status;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user