Copilot commented on code in PR #18379:
URL: https://github.com/apache/iotdb/pull/18379#discussion_r3700828188
##########
iotdb-core/consensus/src/main/java/org/apache/iotdb/consensus/common/Utils.java:
##########
@@ -66,6 +66,10 @@ public FileVisitResult visitFileFailed(Path file,
IOException exc) {
@Override
public FileVisitResult postVisitDirectory(Path dir, IOException
exc) {
+ if (exc != null) {
+ logger.info(ConsensusMessages.VISIT_FILE_FAILED,
dir.toAbsolutePath(), exc);
+ return FileVisitResult.TERMINATE;
+ }
Review Comment:
`postVisitDirectory` logs `ConsensusMessages.VISIT_FILE_FAILED`, but this
callback is for directory traversal failures. The current i18n message text is
explicitly "visit file"/"访问文件", so the log becomes misleading when `dir` is
passed here.
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]