Christian Biesinger wrote:

C.S. wrote:

Moz 1.5/W2K.NS_ERROR_FAILURE, I should restore the code to getthe whole message. tomorrow.


Which extension does your file use? A more likely cause for your error seems to be that the file just has no extension.

You're right. I performed tests again. In fact, all GetTypeFromXXX behave the same way. They seem to throw an NS_ERROR_FAILURE when they don't find any mimetype associated to the extension or no extension.

The thing is : I tested GetTypeFromFile with an url pointing to a
windows shortcut (.lnk) or a directory. I tested GetTypeFromURI
with .jpeg files.

I am really ashamed. Sorry. Nothing more to say.

Maybe returning null or something like that when not finding
any mimetype would be better, but this is another topic.

Sorry again.
CS

_______________________________________________
Mozilla-xpcom mailing list
[EMAIL PROTECTED]
http://mail.mozilla.org/listinfo/mozilla-xpcom

Reply via email to