On Wed, May 9, 2012 at 2:46 PM, waldo kitty <[email protected]> wrote: > wouldn't it be better to use mimemagic instead of relying on the file's > extension?
You mean opening the file and reading the first bytes? For my use case that's an over complication, and subject to multiple possible errors: Permission errors for example. Not really nice. I am implementing LCLIntf.OpenDocument and LCLIntf.OpenURL for Android, and here it might be good to just let whatever app that is choosen handle the file and never open it myself. > i can easily name foo.gif as foo.txt and those systems that do properly look Though luck of whoever changed the extension. That makes choosing the file in dialogs also problematic. I don't care about this use case. -- Felipe Monteiro de Carvalho -- _______________________________________________ Lazarus mailing list [email protected] http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
