diff options
author | Vitaly Takmazov | 2018-04-11 14:21:12 +0300 |
---|---|---|
committer | Vitaly Takmazov | 2018-04-11 14:21:12 +0300 |
commit | bd05298faca4bd7f128281fa3261fb1b2c94d791 (patch) | |
tree | 7d6369b91467fed1518de9a978a465106e8b40ec /juick-common/src/main/java/com | |
parent | f7a2f1440ef0c13a472b1b815186615d2c54168a (diff) |
server: fix moving unreadable files
Diffstat (limited to 'juick-common/src/main/java/com')
-rw-r--r-- | juick-common/src/main/java/com/juick/server/util/ImageUtils.java | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/juick-common/src/main/java/com/juick/server/util/ImageUtils.java b/juick-common/src/main/java/com/juick/server/util/ImageUtils.java index 41455da4..71dec381 100644 --- a/juick-common/src/main/java/com/juick/server/util/ImageUtils.java +++ b/juick-common/src/main/java/com/juick/server/util/ImageUtils.java @@ -153,7 +153,8 @@ public class ImageUtils { attachment.setHeight(info.getHeight()); attachment.setWidth(info.getWidth()); } catch (ImageReadException e) { - logger.info("Can not read {}, moved to {}", imageFile.toPath(), Files.move(imageFile.toPath(), Paths.get(tmpDir), StandardCopyOption.REPLACE_EXISTING)); + logger.info("Can not read {}, moved to {}", imageFile.toPath(), + Files.move(imageFile.toPath(), Paths.get(tmpDir, imageFile.getName()), StandardCopyOption.REPLACE_EXISTING)); } } return attachment; |