Uploaded image for project: 'OFBiz'
  1. OFBiz
  2. OFBIZ-5658

checkExistsImage method in ImageManagementServices

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Trivial
    • Resolution: Fixed
    • Affects Version/s: Release Branch 13.07
    • Fix Version/s: 14.12.01, 12.04.06, 13.07.02
    • Component/s: product
    • Labels:
      None
    • Environment:

      any

      Description

      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);
      }

        Attachments

          Activity

            People

            • Assignee:
              jacques.le.roux Jacques Le Roux
              Reporter:
              chunlinyao chunlinyao
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: