Ticket #6: DataTranslations-2k50412.diff
File DataTranslations-2k50412.diff, 1.1 KB (added by , 20 years ago) |
---|
-
src/prefs/datatranslations/DataTranslations.cpp
71 71 BString newfile; 72 72 73 73 char e_name[B_FILE_NAME_LENGTH]; 74 char mbuf[256];74 //char mbuf[256]; 75 75 76 76 77 77 message->GetInfo("refs", &type, &count); … … 83 83 BEntry entry(&ref, true); 84 84 entry.GetName(e_name); 85 85 86 if ( entry.IsFile() && entry.GetPath(&path) ==B_OK)86 if ( entry.IsFile() && entry.GetPath(&path) == B_OK ) 87 87 { 88 BNode node (&entry); 89 BNodeInfo info (&node); 90 info.GetType (mbuf); 91 string.SetTo(mbuf); 88 BTranslatorRoster *roster = BTranslatorRoster::Default(); 92 89 93 if ( string.FindFirst("application/x-vnd.Be-elfexecutable") != B_ERROR)90 if ( roster->AddTranslators(path.Path()) == B_OK ) 94 91 { 95 92 BDirectory dirt("/boot/home/config/add-ons/Translators/"); 96 93 newfile.SetTo("/boot/home/config/add-ons/Translators/");