aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--juick-www/src/main/java/com/juick/www/Settings.java6
-rw-r--r--readme.txt2
2 files changed, 5 insertions, 3 deletions
diff --git a/juick-www/src/main/java/com/juick/www/Settings.java b/juick-www/src/main/java/com/juick/www/Settings.java
index abe588fe..67f001b6 100644
--- a/juick-www/src/main/java/com/juick/www/Settings.java
+++ b/juick-www/src/main/java/com/juick/www/Settings.java
@@ -158,8 +158,10 @@ public class Settings {
info.setDescription(request.getParameter("descr"));
String avatarTmpPath = Utils.receiveMultiPartFile(request, "avatar");
if (StringUtils.isNotEmpty(avatarTmpPath)) {
- String targetName = String.format("%s.%s", visitor.getUID(), FilenameUtils.getExtension(avatarTmpPath));
- Path ao = Paths.get(imgPath, "ao", targetName);
+ String originalExtension = FilenameUtils.getExtension(avatarTmpPath);
+ String originalName = String.format("%s.%s", visitor.getUID(), originalExtension);
+ String targetName = String.format("%s.png", visitor.getUID());
+ Path ao = Paths.get(imgPath, "ao", originalName);
Path a = Paths.get(imgPath, "a", targetName);
Path as = Paths.get(imgPath, "as", targetName);
Files.move(Paths.get(Utils.getTmpDir(), avatarTmpPath), ao, StandardCopyOption.REPLACE_EXISTING);
diff --git a/readme.txt b/readme.txt
index 53daa4af..c15b149c 100644
--- a/readme.txt
+++ b/readme.txt
@@ -1,4 +1,4 @@
-git clone git@x.juick.com:/srv/git/juick.git
+1git clone git@x.juick.com:/srv/git/juick.git
cd juick