Skip to content

Commit

Permalink
Use getStringProperty for username/group info
Browse files Browse the repository at this point in the history
  • Loading branch information
sodre committed Mar 21, 2022
1 parent 33023b9 commit 45e3c04
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -401,7 +401,7 @@ private FlowFile createOutFlowFile() throws SevenZipException {

// Step two: Fill in the Filename/Path/Absolute Path
// TODO: convert tgz -> tar, taz -> tar, tbz2 -> tar, etc IFF stringProperty is null or empty.
String stringProperty = (String) inArchive.getProperty(index, PropID.PATH);
String stringProperty = inArchive.getStringProperty(index, PropID.PATH);
final File file = new File(
!(stringProperty == null || stringProperty.isEmpty())
? stringProperty
Expand All @@ -419,11 +419,11 @@ private FlowFile createOutFlowFile() throws SevenZipException {
attributes.put(CoreAttributes.ABSOLUTE_PATH.key(), absPathString);

// Step three: USER, GROUP, Dates and Times
stringProperty = (String) inArchive.getProperty(index, PropID.USER);
stringProperty = inArchive.getStringProperty(index, PropID.USER);
if (stringProperty != null && !stringProperty.isEmpty())
attributes.put(FILE_OWNER_ATTRIBUTE, stringProperty);

stringProperty = (String) inArchive.getProperty(index, PropID.GROUP);
stringProperty = inArchive.getStringProperty(index, PropID.GROUP);
if (stringProperty != null && !stringProperty.isEmpty())
attributes.put(FILE_GROUP_ATTRIBUTE, stringProperty);

Expand Down

0 comments on commit 45e3c04

Please sign in to comment.