Uploaded image for project: 'Camel'
  1. Camel
  2. CAMEL-1428

SftpConsumer : GenericFileRenameProcessStrategy - String index out of bounds

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.0.0
    • 2.0-M1
    • camel-ftp
    • None
    • Windows XP

    Description

      While trying to consume a file via SFTP and using the moveExpression to move the file into a done folder a renameException is thrown.

      In GenericFile the relativeFileName reads something like the following. /incoming/test/file1.txt

      When it tries to call this code and exception is thrown because File.separator is '\' in a windows environment.
      String relative = relativeFileName.substring(0, relativeFileName.lastIndexOf(File.separator));

      Attachments

        1. camel-error4.txt
          6 kB
          Paddy Daly
        2. camel-error3.txt
          6 kB
          Paddy Daly
        3. camel-error2.txt
          14 kB
          Paddy Daly
        4. camel-error.txt
          4 kB
          Paddy Daly

        Issue Links

          Activity

            People

              davsclaus Claus Ibsen
              watcher Paddy Daly
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: