I agree adding the extension is probably worth it - smart users can rename if they really need a name without extension. In testing the only case it doesn't solve is if the extension is entered wrong, e.g. saving "Document.jph" will save a JPEG if you have JPEG selected in the dialog. It should probably offer to rename it to .jpg (though you could have a valid name like "robert.ancell" so you can't do it automatically). Doesn't seem as likely as completely omitting an extension though.
OK, code looks great now.
I agree adding the extension is probably worth it - smart users can rename if they really need a name without extension. In testing the only case it doesn't solve is if the extension is entered wrong, e.g. saving "Document.jph" will save a JPEG if you have JPEG selected in the dialog. It should probably offer to rename it to .jpg (though you could have a valid name like "robert.ancell" so you can't do it automatically). Doesn't seem as likely as completely omitting an extension though.
Thanks!