You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@nifi.apache.org by GitBox <gi...@apache.org> on 2020/07/06 20:42:23 UTC

[GitHub] [nifi] turcsanyip commented on a change in pull request #4371: NIFI-7589 Fix path value when unpacking tar

turcsanyip commented on a change in pull request #4371:
URL: https://github.com/apache/nifi/pull/4371#discussion_r450468675



##########
File path: nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/UnpackContent.java
##########
@@ -309,7 +309,10 @@ public void process(final InputStream in) throws IOException {
                             }
                             final File file = new File(tarEntry.getName());
                             final Path filePath = file.toPath();
-                            final String filePathString = filePath.getParent() + "/";
+                            String filePathString = "/";

Review comment:
       You could avoid variable reassignment by moving it to the `else` case of the if statement.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org