Add requestion option to trust client-provided name in sendMessage for

internal web server
This commit is contained in:
Mike Primm 2011-06-23 16:35:17 -05:00
parent 244419d686
commit c2ee0ebd42
4 changed files with 18 additions and 9 deletions

View file

@ -117,9 +117,8 @@ public class FileLockManager {
while(!done) {
try {
ImageIO.write(img, type, fname);
fname.setLastModified(System.currentTimeMillis());
done = true;
} catch (FileNotFoundException fnfx) { /* This seems to be what we get when file is locked by reader */
} catch (IOException fnfx) {
if(retrycnt < MAX_WRITE_RETRIES) {
Log.info("Image file " + fname.getPath() + " - unable to write - retry #" + retrycnt);
try { Thread.sleep(50 << retrycnt); } catch (InterruptedException ix) { throw fnfx; }