From e83935e59b2ed9bbde75e2751c95824943f9e9cf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Axel=20D=C3=B6rfler?= Date: Mon, 3 Apr 2006 16:52:40 +0000 Subject: [PATCH] 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 --- src/kits/storage/mime/Database.cpp | 24 ++++++++++-------------- 1 file changed, 10 insertions(+), 14 deletions(-) diff --git a/src/kits/storage/mime/Database.cpp b/src/kits/storage/mime/Database.cpp index 623d2883ef..24ea09fcd1 100644 --- a/src/kits/storage/mime/Database.cpp +++ b/src/kits/storage/mime/Database.cpp @@ -7,12 +7,12 @@ * Axel Dörfler, axeld@pinc-software.de */ -/*! - \file Database.cpp - Database class implementation -*/ -#include "mime/Database.h" +#include + +#include +#include +#include #include #include @@ -21,13 +21,10 @@ #include #include #include -#include -#include #include #include #include #include -#include #include #include @@ -171,15 +168,14 @@ Database::Delete(const char *type) status = entry.Remove(); - // Notify the installed types database - if (status != B_OK) + if (status == B_OK) { + // Notify the installed types database fInstalledTypes.RemoveType(type); - // Notify the supporting apps database - if (status != B_OK) + // Notify the supporting apps database fSupportingApps.DeleteSupportedTypes(type, true); - // Notify the monitor service - if (status != B_OK) + // Notify the monitor service _SendDeleteNotification(type); + } return status; }