Skip to content

Commit

Permalink
Removed file path from the input and output files names at the client…
Browse files Browse the repository at this point in the history
… side. Otherwise, the full filepath formed at the client will not be transformed correctly at the server side if the server and client run on different operating systems due to different File.separator values.
  • Loading branch information
aynur committed Dec 8, 2017
1 parent 11d3767 commit e45237b
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -707,7 +707,11 @@ protected JsonObject getJsonFromParamList(ParamList paramList) {
commandItem = option.getValue();
}
} else if (option.getUsedAs().equals(ParamInfo.USED_IN_COMMAND_AS_OPTION) && !option.getDefaultValue().equals(option.getValue())) {
commandItem = option.getName() + "=" + option.getValue();
if (option.getType().equals(ParamInfo.Type.IFILE) || option.getType().equals(ParamInfo.Type.OFILE) ) {
commandItem = option.getName() + "=" + option.getValue().substring(option.getValue().lastIndexOf(File.separator) + 1);
} else {
commandItem = option.getName() + "=" + option.getValue();
}
if (option.getType().equals(ParamInfo.Type.OFILE)) {
ofileDir = option.getValue().substring(0, option.getValue().lastIndexOf(File.separator));
}
Expand Down

0 comments on commit e45237b

Please sign in to comment.