This is an automated email from the ASF dual-hosted git repository. ggregory pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/commons-io.git
The following commit(s) were added to refs/heads/master by this push: new 36e15d1ce [IO-872] PathUtils.directoryAndFileContentEquals doesn't work across FileSystems 36e15d1ce is described below commit 36e15d1ce9ad21252b93de2d7b19146a171aeee1 Author: Gary Gregory <garydgreg...@gmail.com> AuthorDate: Fri Apr 4 15:29:12 2025 -0400 [IO-872] PathUtils.directoryAndFileContentEquals doesn't work across FileSystems No need to normalize during traversal --- src/main/java/org/apache/commons/io/file/PathUtils.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/main/java/org/apache/commons/io/file/PathUtils.java b/src/main/java/org/apache/commons/io/file/PathUtils.java index 21a82d540..a9099d42c 100644 --- a/src/main/java/org/apache/commons/io/file/PathUtils.java +++ b/src/main/java/org/apache/commons/io/file/PathUtils.java @@ -1736,8 +1736,7 @@ public static BigInteger sizeOfDirectoryAsBigInteger(final Path directory) throw return countDirectoryAsBigInteger(directory).getByteCounter().getBigInteger(); } - private static Path stripTrailingSeparator(final Path path) { - final Path dir = path.normalize(); + private static Path stripTrailingSeparator(final Path dir) { final String separator = dir.getFileSystem().getSeparator(); final String fileName = getFileNameString(dir); return fileName != null && fileName.endsWith(separator) ? dir.resolveSibling(fileName.substring(0, fileName.length() - 1)) : dir;