aboutsummaryrefslogtreecommitdiff
path: root/juick-common/src/main/java/com
diff options
context:
space:
mode:
Diffstat (limited to 'juick-common/src/main/java/com')
-rw-r--r--juick-common/src/main/java/com/juick/server/util/ImageUtils.java3
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;