aboutsummaryrefslogtreecommitdiff
path: root/juick-common/src/main/java/com/juick/server
diff options
context:
space:
mode:
Diffstat (limited to 'juick-common/src/main/java/com/juick/server')
-rw-r--r--juick-common/src/main/java/com/juick/server/util/ImageUtils.java5
1 files changed, 4 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 3e03314b..d16faf8f 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
@@ -25,6 +25,7 @@ import org.apache.commons.imaging.common.ImageMetadata;
import org.apache.commons.imaging.formats.jpeg.JpegImageMetadata;
import org.apache.commons.imaging.formats.tiff.TiffField;
import org.apache.commons.imaging.formats.tiff.constants.TiffTagConstants;
+import org.apache.commons.io.FileUtils;
import org.apache.commons.io.FilenameUtils;
import org.imgscalr.Scalr;
import org.imgscalr.Scalr.Rotation;
@@ -120,7 +121,9 @@ public class ImageUtils {
String ext = FilenameUtils.getExtension(outputFilename);
Path outputImagePath = Paths.get(imgDir, "p", outputFilename);
- Files.move(Paths.get(tmpDir, tempFilename), outputImagePath);
+ // this throws strange exceptions
+ // Files.move(Paths.get(tmpDir, tempFilename), outputImagePath);
+ FileUtils.moveFile(Paths.get(tmpDir, tempFilename).toFile(), outputImagePath.toFile());
BufferedImage originalImage = readImageWithOrientation(outputImagePath.toFile());
int width = originalImage.getWidth();