Skip to content

Commit

Permalink
HPCC4J-581 Code review
Browse files Browse the repository at this point in the history
- Do not trim original string parameter
- Do not duplicate Path URL param

Signed-off-by: Rodrigo Pastrana <[email protected]>
  • Loading branch information
rpastrana committed Mar 7, 2024
1 parent 7587136 commit 922afe2
Showing 1 changed file with 1 addition and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1487,14 +1487,11 @@ public boolean uploadLargeFile(File uploadFile, DropZoneWrapper dropZone)
return false;
}

String path = Utils.ensureTrailingPathSlash(dropZone.getPath().trim());

uploadurlbuilder += "&NetAddress=" + dropZone.getNetAddress() + "&Path=" + path;
uploadurlbuilder += "&NetAddress=" + dropZone.getNetAddress() + "&Path=" + Utils.ensureTrailingPathSlash(dropZone.getPath());

if (!dropZone.getName().isEmpty())
uploadurlbuilder += "&DropZoneName=" + dropZone.getName();

uploadurlbuilder += "&Path=" + path;
uploadurlbuilder += "&OS=" + (dropZone.getLinux().equalsIgnoreCase("true") ? "2" : "1");
uploadurlbuilder += "&rawxml_=1";
WritableByteChannel outchannel = null;
Expand Down

0 comments on commit 922afe2

Please sign in to comment.