Ticket #6: DataTranslations.diff

File DataTranslations.diff, 743 bytes (added by johndrinkwater, 14 years ago)

Possible fix, uses BTranslatorRoster::AddTranslators()

Line 
174c74
2<   char mbuf[256];
3---
4>   //char mbuf[256];
586c86
6<       if ( entry.IsFile() && entry.GetPath(&path)==B_OK)
7---
8>       if ( entry.IsFile() && entry.GetPath(&path) == B_OK )
988,91c88,93
10<           BNode      node (&entry);
11<           BNodeInfo  info (&node);
12<           info.GetType (mbuf);
13<           string.SetTo(mbuf);
14---
15>       // No longer required if BTranslatorRoster is doing the checking
16>       // BNode      node (&entry);
17>           // BNodeInfo  info (&node);
18>           // info.GetType (mbuf);
19>           // string.SetTo(mbuf);
20>       BTranslatorRoster *roster = BTranslatorRoster::Default();
2193c95
22<           if (string.FindFirst("application/x-vnd.Be-elfexecutable") != B_ERROR )
23---
24>           if ( roster->AddTranslators(&path) == B_OK )