From 3f5affa07feef0c142d61437da6916c1da7548f8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Axel=20D=C3=B6rfler?= Date: Sat, 4 Nov 2006 17:22:04 +0000 Subject: [PATCH] BeOS returns B_BAD_VALUE for some things on shared libraries. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19204 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/build/libbe/storage/mime/UpdateMimeInfoThread.cpp | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/build/libbe/storage/mime/UpdateMimeInfoThread.cpp b/src/build/libbe/storage/mime/UpdateMimeInfoThread.cpp index 0dc92ad1d9..31e512d7e3 100644 --- a/src/build/libbe/storage/mime/UpdateMimeInfoThread.cpp +++ b/src/build/libbe/storage/mime/UpdateMimeInfoThread.cpp @@ -255,8 +255,13 @@ UpdateMimeInfoThread::DoMimeUpdate(const entry_ref *entry, bool *entryIsDir) err = appFileInfoRead.GetSignature(signature); if (err == B_OK) err = appFileInfoWrite.SetSignature(signature); - else if (err == B_ENTRY_NOT_FOUND || err == B_NAME_NOT_FOUND) + else if (err == B_ENTRY_NOT_FOUND || err == B_NAME_NOT_FOUND || err == B_BAD_VALUE) { + // BeOS returns B_BAD_VALUE on shared libraries err = appFileInfoWrite.SetSignature(NULL); +#if defined(HAIKU_HOST_PLATFORM_DANO) || defined(HAIKU_HOST_PLATFORM_BEOS) && defined(HAIKU_HOST_PLATFORM_BONE) + err = B_OK; +#endif + } if (err != B_OK) return err; @@ -265,7 +270,7 @@ UpdateMimeInfoThread::DoMimeUpdate(const entry_ref *entry, bool *entryIsDir) err = appFileInfoRead.GetAppFlags(&appFlags); if (err == B_OK) { err = appFileInfoWrite.SetAppFlags(appFlags); - } else if (err == B_ENTRY_NOT_FOUND || err == B_NAME_NOT_FOUND) { + } else if (err == B_ENTRY_NOT_FOUND || err == B_NAME_NOT_FOUND || err == B_BAD_VALUE) { file.RemoveAttr(kAppFlagsAttribute); err = B_OK; } @@ -279,7 +284,7 @@ UpdateMimeInfoThread::DoMimeUpdate(const entry_ref *entry, bool *entryIsDir) if (err == B_OK) { err = appFileInfoWrite.SetSupportedTypes(&supportedTypes); hasSupportedTypes = true; - } else if (err == B_ENTRY_NOT_FOUND || err == B_NAME_NOT_FOUND) { + } else if (err == B_ENTRY_NOT_FOUND || err == B_NAME_NOT_FOUND || err == B_BAD_VALUE) { #if defined(HAIKU_HOST_PLATFORM_DANO) || defined(HAIKU_HOST_PLATFORM_BEOS) && defined(HAIKU_HOST_PLATFORM_BONE) file.RemoveAttr(kSupportedTypesAttr); err = B_OK;