You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ofbiz.apache.org by "chunlinyao (JIRA)" <ji...@apache.org> on 2014/06/16 16:52:02 UTC
[jira] [Created] (OFBIZ-5658) checkExistsImage method in
ImageManagementServices
chunlinyao created OFBIZ-5658:
---------------------------------
Summary: checkExistsImage method in ImageManagementServices
Key: OFBIZ-5658
URL: https://issues.apache.org/jira/browse/OFBIZ-5658
Project: OFBiz
Issue Type: Bug
Components: framework
Affects Versions: Release Branch 13.07
Environment: any
Reporter: chunlinyao
Priority: Trivial
I think indexOf(".") in these code should be lastIndexOf(".")
public static File checkExistsImage(File file) {
if (!file.exists()) {
imageCount = 0;
imagePath = null;
return file;
}
imageCount++;
String filePath = imagePath.substring(0, imagePath.indexOf("."));
String type = imagePath.substring(imagePath.indexOf(".") + 1);
file = new File(filePath + "(" + imageCount + ")." + type);
return checkExistsImage(file);
}
--
This message was sent by Atlassian JIRA
(v6.2#6252)