[haiku-commits] Re: r40858 - in haiku/trunk: headers/build/os/storage headers/os/storage src/build/libbe/storage src/build/libbe/storage/mime src/kits/storage ...

  • From: Ingo Weinhold <ingo_weinhold@xxxxxx>
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Tue, 08 Mar 2011 11:16:17 +0100

On 2011-03-07 at 16:14:47 [+0100], jonas@xxxxxxxxxxx wrote:
> Author: kirilla
> Date: 2011-03-07 16:14:46 +0100 (Mon, 07 Mar 2011)
> New Revision: 40858
> Changeset: http://dev.haiku-os.org/changeset/40858
> 
> Modified:
>    haiku/trunk/headers/build/os/storage/AppFileInfo.h
>    haiku/trunk/headers/os/storage/AppFileInfo.h
>    haiku/trunk/src/build/libbe/storage/AppFileInfo.cpp
>    haiku/trunk/src/build/libbe/storage/mime/UpdateMimeInfoThread.cpp
>    haiku/trunk/src/kits/storage/AppFileInfo.cpp
>    haiku/trunk/src/servers/registrar/mime/UpdateMimeInfoThread.cpp
> Log:
> Add app filename localization catalog entry support to BAppFileInfo, 
> registrar and mimeset. Need help to understand why the build-version of 
> UpdateMimeInfoThread.cpp does not compile with the added code, currently 
> commented out.

What does the compiler say?

> Sorry about the arbitrary B_MIME_TYPE_LENGTH*3. Advice and 
> review welcome.

The key is a file name, so B_FILE_NAME_LENGTH should be used for it. I don't 
know, if there's an actual length limit for the context -- maybe one could be 
introduced. Alternatively simply make BAppFileInfo::GetCatalogEntry() return 
a dynamically sized structure -- a BString or some class that already 
provides access to the parsed components.

CU, Ingo

Other related posts: