turcsanyip commented on a change in pull request #4370:
URL: https://github.com/apache/nifi/pull/4370#discussion_r452826113
##########
File path:
nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/UnpackContent.java
##########
@@ -321,6 +337,13 @@ public void process(final InputStream in) throws
IOException {
attributes.put(CoreAttributes.ABSOLUTE_PATH.key(), absPathString);
attributes.put(CoreAttributes.MIME_TYPE.key(),
OCTET_STREAM);
+ attributes.put(FILE_PERMISSIONS_ATTRIBUTE,
FileInfo.permissionToString(tarEntry.getMode()));
+ attributes.put(FILE_OWNER_ATTRIBUTE,
String.valueOf(tarEntry.getUserName()));
+ attributes.put(FILE_GROUP_ATTRIBUTE,
String.valueOf(tarEntry.getGroupName()));
+
+ final String timeAsString =
DATE_TIME_FORMATTER.format(tarEntry.getModTime().toInstant());
+
attributes.put(FILE_LAST_MODIFIED_TIME_ATTRIBUTE, timeAsString);
Review comment:
I think `file.creationTime` should also be filled in with the same
modification time value (no creation time available for the tar entries).
`file.creationTime` still holds the attribute of the original tar file which
is not really consistent because `lastModifiedTime` will be an earlier date
than `creationTime`.
@Wastack, @MikeThomsen, @tpalfy: what is your opinion?
----------------------------------------------------------------
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:
[email protected]