Merge branch 'dev' of fanxb/bookmark into master
This commit is contained in:
commit
9e2c75c3ec
@ -404,7 +404,7 @@ public class BookmarkServiceImpl implements BookmarkService {
|
||||
* @author FleyX
|
||||
*/
|
||||
private String saveToFile(String iconUrl, String host, byte[] b) {
|
||||
String fileName = URLEncoder.encode(host, StandardCharsets.UTF_8) + iconUrl.substring(iconUrl.lastIndexOf("."));
|
||||
String fileName = host.replace(":", ".") + iconUrl.substring(iconUrl.lastIndexOf("."));
|
||||
String filePath = Paths.get(FileConstant.FAVICON_PATH, host.replace("www", "").replaceAll("\\.", "").substring(0, 2), fileName).toString();
|
||||
FileUtil.writeBytes(b, Paths.get(CommonConstant.fileSavePath, filePath).toString());
|
||||
return File.separator + filePath;
|
||||
|
Loading…
x
Reference in New Issue
Block a user