Ticket #8124: localized_names.patch

File localized_names.patch, 1.1 KB (added by anevilyak, 12 years ago)
  • src/kits/locale/LocaleRoster.cpp

    diff --git a/src/kits/locale/LocaleRoster.cpp b/src/kits/locale/LocaleRoster.cpp
    index 8f3f0b1..9be4392 100644
    a b  
    2121#include <Catalog.h>
    2222#include <Collator.h>
    2323#include <DefaultCatalog.h>
     24#include <FindDirectory.h>
    2425#include <Directory.h>
    2526#include <Entry.h>
    2627#include <File.h>
    BLocaleRoster::GetLocalizedFileName(BString& localizedFileName,  
    461462    status_t status = _PrepareCatalogEntry(ref, signature, context, string,
    462463        traverse);
    463464
    464     if (status != B_OK)
    465         return status;
     465    if (status != B_OK) {
     466        BPath path;
     467        status = find_directory(B_SYSTEM_LIB_DIRECTORY, &path);
     468        if (status != B_OK)
     469            return status;
     470
     471        path.Append("libtracker.so");
     472        entry_ref libtrackerRef;
     473        status = get_ref_for_path(path.Path(), &libtrackerRef);
     474        if (status != B_OK)
     475            return status;
     476        status = _PrepareCatalogEntry(libtrackerRef, signature, context,
     477            string, traverse);
     478        if (status != B_OK)
     479            return status;
     480    }
    466481
    467482    BCatalog catalog(ref);
    468483    const char* temp = catalog.GetString(string, context);