Skip to content

Commit

Permalink
Fix 2 list files tests with "/"
Browse files Browse the repository at this point in the history
  • Loading branch information
HydrolienF committed May 29, 2024
1 parent 47c7da6 commit c30c30c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/main/java/fr/formiko/utils/FLUFiles.java
Original file line number Diff line number Diff line change
Expand Up @@ -320,7 +320,7 @@ private void zipFile(File fileToZip, String fileName, String destination, ZipOut
allOk.set(0, false);
}
});
if (!allOk.getFirst()) {
if (!allOk.get(0)) {
throw new IOException("Error while zipping");
}
} else {
Expand Down
4 changes: 2 additions & 2 deletions src/test/java/fr/formiko/utils/FLUFilesTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -270,8 +270,8 @@ void testListFiles(String path, boolean shouldWork, List<String> expectedFiles)

private static Stream<Arguments> testListFilesSource() {
return Stream.of(
Arguments.of(TEST_PATH, true, List.of("existingDir", "existingFile.x", "existingFile2", "existingFile3", "existingFile4")),
Arguments.of(TEST_PATH + "existingDir/", true, List.of("subDir")),
Arguments.of(TEST_PATH, true, List.of("existingDir/", "existingFile.x", "existingFile2", "existingFile3", "existingFile4")),
Arguments.of(TEST_PATH + "existingDir/", true, List.of("subDir/")),
Arguments.of(TEST_PATH + "existingDir/subDir/", true, List.of("existingFile.txt")), Arguments.of(null, false, null),
Arguments.of(TEST_PATH + "unexistingDirectory", false, null));
}
Expand Down

0 comments on commit c30c30c

Please sign in to comment.