karaf-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ethan Manns (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (KARAF-5320) Karaf Command Arguments escapes backslash characters
Date Mon, 28 Aug 2017 16:40:00 GMT

     [ https://issues.apache.org/jira/browse/KARAF-5320?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Ethan Manns updated KARAF-5320:
-------------------------------
    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.

  was:
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}}.




> Karaf Command Arguments escapes backslash characters
> ----------------------------------------------------
>
>                 Key: KARAF-5320
>                 URL: https://issues.apache.org/jira/browse/KARAF-5320
>             Project: Karaf
>          Issue Type: Bug
>          Components: karaf-shell
>    Affects Versions: 4.1.1
>            Reporter: Ethan Manns
>
> 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.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Mime
View raw message