mirror of
https://github.com/correl/mage.git
synced 2024-12-27 03:00:13 +00:00
If saving a thumbnail image fails, delete the resulting file.
OpenJDK throws "javax.imageio.IIOException: Invalid argument to native writeImage", because it does not support transparency, and that results in zero-sized thumbnail files being created.
This commit is contained in:
parent
658daa65e3
commit
90486afdbb
1 changed files with 12 additions and 11 deletions
|
@ -298,6 +298,7 @@ public class ImageCache {
|
||||||
}
|
}
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
log.error(e,e);
|
log.error(e,e);
|
||||||
|
imageFile.delete();
|
||||||
}
|
}
|
||||||
return image;
|
return image;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue