Ticket #6: DataTranslations-2k50412.diff

File DataTranslations-2k50412.diff, 1.1 KB (added by johndrinkwater, 19 years ago)

Ammended after a test compile

  • src/prefs/datatranslations/DataTranslations.cpp

     
    7171   BString newfile;
    7272
    7373   char e_name[B_FILE_NAME_LENGTH];
    74    char mbuf[256];
     74   //char mbuf[256];
    7575
    7676
    7777   message->GetInfo("refs", &type, &count);
     
    8383       BEntry entry(&ref, true);
    8484       entry.GetName(e_name);
    8585
    86        if ( entry.IsFile() && entry.GetPath(&path)==B_OK)
     86       if ( entry.IsFile() && entry.GetPath(&path) == B_OK )
    8787       {
    88            BNode      node (&entry);
    89            BNodeInfo  info (&node);
    90            info.GetType (mbuf);
    91            string.SetTo(mbuf);
     88           BTranslatorRoster *roster = BTranslatorRoster::Default();
    9289
    93            if (string.FindFirst("application/x-vnd.Be-elfexecutable") != B_ERROR )
     90           if ( roster->AddTranslators(path.Path()) == B_OK )
    9491           {
    9592               BDirectory dirt("/boot/home/config/add-ons/Translators/");
    9693               newfile.SetTo("/boot/home/config/add-ons/Translators/");