You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nifi.apache.org by tu...@apache.org on 2020/07/14 15:35:10 UTC
[nifi] branch main updated: NIFI-7589 Fix path value when unpacking
tar
This is an automated email from the ASF dual-hosted git repository.
turcsanyi pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/nifi.git
The following commit(s) were added to refs/heads/main by this push:
new 72666a9 NIFI-7589 Fix path value when unpacking tar
72666a9 is described below
commit 72666a9c7e87c39110039ac38b4ea303c317330d
Author: Tamás Bunth <bt...@gmail.com>
AuthorDate: Tue Jun 30 16:37:45 2020 +0200
NIFI-7589 Fix path value when unpacking tar
Refactor: remove variable reassignment
This closes #4371.
Signed-off-by: Peter Turcsanyi <tu...@apache.org>
---
.../main/java/org/apache/nifi/processors/standard/UnpackContent.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/UnpackContent.java b/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/UnpackContent.java
index 29ce0ce..32e9ff8 100644
--- a/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/UnpackContent.java
+++ b/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/UnpackContent.java
@@ -309,7 +309,7 @@ public class UnpackContent extends AbstractProcessor {
}
final File file = new File(tarEntry.getName());
final Path filePath = file.toPath();
- final String filePathString = filePath.getParent() + "/";
+ String filePathString = filePath.getParent() == null ? "/" : filePath.getParent() + "/";
final Path absPath = filePath.toAbsolutePath();
final String absPathString = absPath.getParent().toString() + "/";