On Sep 29, 2006, at 22:19, Matt Healy wrote:
Hi Matt,
I believe that I've stumbled across a bug in the PNGRenderer's
'setOutputDirectory' method. If the user has set an output file on
the user agent, but the file doesn't include an extension, a
StringIndexOutOfBoundsException is thrown when the PNGRenderer
attempts to deduce the "file prefix" to be used for the various
pages, causing the rendering attempt to fail.
This isn't likely to be an issue under many circumstances, since
users will frequently specify the file name using an extension
(e.g., "/Volumes/Stuff/ProjectReport.png"), but if the user is
accustomed to working on an OS that doesn't mandate file extensions
(e.g., OS X), this problem could come up, and it's reasonably easy
to resolve.
Seems like a fine suggestion to me, however, there's still a (rather
exceptional) case that won't be covered:
What if the user doesn't specify an extension, but uses a '.'
elsewhere in the filename?
More waterproof may be to suppose that, if there is an extension, it
will always be '.png' or '.PNG' (?)
Cheers,
Andreas
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]