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

checkExistsImage method in ImageManagementServices

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Trivial
    • Resolution: Fixed
    • Release Branch 13.07
    • 14.12.01, 12.04.06, 13.07.02
    • product
    • None
    • 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

            jleroux Jacques Le Roux
            chunlinyao chunlinyao
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: