исправил баг в функции отвечающей за рекурсивное удаление файлов с определенными расширениями.

This commit is contained in:
2023-10-02 01:02:07 +03:00
parent bf25aae4d9
commit 6271d6272a
4 changed files with 16 additions and 12 deletions

View File

@@ -669,13 +669,17 @@ public class Utils {
if (files != null) {
for (File file : files) {
if (file.isFile()) {
String file_extension = getExtension(file);
for (String ext : extensions) {
if (getExtension(file).equalsIgnoreCase(ext))
if (file_extension.equalsIgnoreCase(ext)) {
res.add(file);
// System.out.println(file.getAbsolutePath() + ":" + Utils.Brackets(file_extension));
// System.out.println("MATCH");
}
}
}
if (file.isDirectory())
getFilesByExtensions_r(file, res);
getFilesByExtensions_r(file, res, extensions);
}
}
}