"Axel Dörfler" <axeld@xxxxxxxxxxxxxxxx> wrote: > "Andrew Bachmann" <shatty@xxxxxxxxxxxxx> wrote: > > Hello I should point out a related thing that can also be considered > > to be a bug in the R5 implementation. I discovered during coding > > FileType that GetSupportingApps returns an error in this case: > > > > 1. you have an app that handles "image" > > 2. you have some file type like "image/weird" > > 3. no application ever handled "image/weird" > > > > The very weird part is the "ever" of #3, because if you defined an > > app to handle that type at one point and then removed it, then > > it returns B_OK. (and returns apps handling "image") > > Are you sure about that? Yes. > How will it then be able to open anything for the first time? Hmm.. I'm not being clear, I don't mean, the app has never opened an "image/weird", I mean no app has ever had "image/weird" in their list of supported types. > Do you have a step-by-step explanation on how to reproduce that bug? Sure: 1. take any file, change it's type to text/xyz123 2. right click on the file, and go to the open with menu 3. the menu is empty, despite the fact that StyledEdit handles "text" 4. add text/xyz123 to the list of handled mime types for MediaPlayer, by dragging and dropping your new file into the list of Supported Types on FileType opened on MediaPlayer. 5. save MediaPlayer in FileType 6. right click on the file, MediaPlayer is first, but suddenly a large number of "text" handling apps have also appeared. 7. remove the text/xyz123 [R5 FileType crashed my Tracker here] 8. right click on the file, MediaPlayer is gone, the other "text" handling apps are still present. My guess is that this has something to do with the fact that "text/xyz123" is not a registered mimetype in the database until step 5. In fact, if you add the mimetype to the database directly through the File Types interface, then it does work okay. So I suppose you could say the bug is: "GetSupportingApps does not work for mimetypes that are not in the database, even if the supertype is" > Does it show up in our implementation as well? Visual inspection would lead me to believe that our implementation does not have this bug. If the complete type is not in the database, our implementation goes on to check the supertype independently anyway. Yay for OBOS. :-) Andrew