Uploaded image for project: 'Karaf'
  1. Karaf
  2. KARAF-5320

Karaf Command Arguments escapes backslash characters

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 4.1.1
    • 4.1.3, 4.2.0.M1
    • karaf
    • None

    Description

      Karaf shell command arguments will escape backslashes even when the argument is entered in the console surrounded by quotes. As an example, this creates issues with attempting to enter Windows file paths as they appear on the file system.
      myCommand "C:\Users\MyUser\Documents\example.txt" or myCommand C:\Users\MyUser\Documents\example.txt
      will have the argument passed in as
      C:UsersMyUserDocumentsexample.txt.

      It seems like the argument goes through a double interpretation of the escape chars, since the path can come through correctly as myCommand "C:\\\\Users\\\\MyUser\\\\Documents\\\\example.txt", so a workaround exists, but there is a lack of parity between commands involving file paths on *nix and Windows systems as drag-and-drop or copy-paste of paths will not work on Windows as is.

      Attachments

        Activity

          People

            gnodet Guillaume Nodet
            ethan.manns Ethan Manns
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: