You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ofbiz.apache.org by "Jacques Le Roux (JIRA)" <ji...@apache.org> on 2014/06/22 11:17:24 UTC
[jira] [Comment Edited] (OFBIZ-5658) checkExistsImage method in
ImageManagementServices
[ https://issues.apache.org/jira/browse/OFBIZ-5658?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14040074#comment-14040074 ]
Jacques Le Roux edited comment on OFBIZ-5658 at 6/22/14 9:16 AM:
-----------------------------------------------------------------
Thanks for the explanation, I agree about your fix and I will commit it.
I know this Jira is only about this issue. But, the thread safe issue apart, I still wonder if you got this feature (the Image Management as a whole) to work? And If yes, if you could share how you did?
There are so much things I don't like in this feature, that I don't know where to begin. But the major one is, despite nothing working as expected in the UI (with errors when uploading for instance), that the images are loaded under framework/images/webapp/images/products/management. I'd prefer those to be under runtime (like we have the Lucene indexes for instance) or even a specific hot-deploy folder, etc.
was (Author: jacques.le.roux):
Thanks for the explanation, I agree about your fix and I will commit it.
I know this Jira is only about this issue. But, the thread safe issue apart, I still wonder if you got this feature (the Image Management as a whole) to work? And If yes, if you could share how you did?
> checkExistsImage method in ImageManagementServices
> ---------------------------------------------------
>
> Key: OFBIZ-5658
> URL: https://issues.apache.org/jira/browse/OFBIZ-5658
> Project: OFBiz
> Issue Type: Bug
> Components: product
> 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)