From 3a4c7e6e71bcd6837594bc792db974a1eb8b65a7 Mon Sep 17 00:00:00 2001 From: Ingo Weinhold Date: Sun, 4 May 2008 12:48:21 +0000 Subject: [PATCH] If the supplied entry was a directory, CreateAppMetaMimeThread::DoMimeUpdate() would always fail early, making recursive operation impossible. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25307 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/servers/registrar/mime/CreateAppMetaMimeThread.cpp | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/servers/registrar/mime/CreateAppMetaMimeThread.cpp b/src/servers/registrar/mime/CreateAppMetaMimeThread.cpp index bb7f46160b..27de6e6dc4 100644 --- a/src/servers/registrar/mime/CreateAppMetaMimeThread.cpp +++ b/src/servers/registrar/mime/CreateAppMetaMimeThread.cpp @@ -49,6 +49,13 @@ CreateAppMetaMimeThread::DoMimeUpdate(const entry_ref* ref, bool* _entryIsDir) if (status < B_OK) return status; + bool isDir = file.IsDirectory(); + if (_entryIsDir != NULL) + *_entryIsDir = isDir; + + if (isDir) + return B_OK; + BAppFileInfo appInfo(&file); status = appInfo.InitCheck(); if (status < B_OK) @@ -143,9 +150,6 @@ CreateAppMetaMimeThread::DoMimeUpdate(const entry_ref* ref, bool* _entryIsDir) status = mime.SetIconForType(type, &largeIcon, B_LARGE_ICON); } - if (status == B_OK && _entryIsDir != NULL) - *_entryIsDir = file.IsDirectory(); - return status; }