Skip to content

Commit 36e15d1

Browse files
committed
[IO-872] PathUtils.directoryAndFileContentEquals doesn't work across
FileSystems No need to normalize during traversal
1 parent e0892e0 commit 36e15d1

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/main/java/org/apache/commons/io/file/PathUtils.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1736,8 +1736,7 @@ public static BigInteger sizeOfDirectoryAsBigInteger(final Path directory) throw
17361736
return countDirectoryAsBigInteger(directory).getByteCounter().getBigInteger();
17371737
}
17381738

1739-
private static Path stripTrailingSeparator(final Path path) {
1740-
final Path dir = path.normalize();
1739+
private static Path stripTrailingSeparator(final Path dir) {
17411740
final String separator = dir.getFileSystem().getSeparator();
17421741
final String fileName = getFileNameString(dir);
17431742
return fileName != null && fileName.endsWith(separator) ? dir.resolveSibling(fileName.substring(0, fileName.length() - 1)) : dir;

0 commit comments

Comments
 (0)