Skip to content

Commit

Permalink
fix(file-assertions): fix method fileTree to compare realPath of pare…
Browse files Browse the repository at this point in the history
…nt with subdirectories, issue #3001

Signed-off-by: arman-yekkehkhani <arman.yekkehkhani@gmail.com>
(cherry picked from commit 2442766)
  • Loading branch information
arman-yekkehkhani committed May 3, 2024
1 parent dc0ce29 commit 6cb25ac
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ public static FileAssertions assertThat(File file) {
public AbstractListAssert<ListAssert<String>, List<? extends String>, String, ObjectAssert<String>> fileTree()
throws IOException {

final Path actualPath = actual.toPath().normalize();
final Path actualPath = actual.toPath().normalize().toRealPath();
final List<String> paths = new ArrayList<>();
try (Stream<Path> pathStream = Files.walk(actualPath)) {
for (Path temp : pathStream
Expand Down

0 comments on commit 6cb25ac

Please sign in to comment.