Added check if provided path is directory

This commit is contained in:
Georgy Litvinov 2023-03-03 14:47:23 +01:00
parent 0c8b02a630
commit dae6a808b6

View file

@ -152,12 +152,14 @@ public class TranslationConverter {
log.debug("prefixesRegex " + prefixesRegex); log.debug("prefixesRegex " + prefixesRegex);
for (String dir : i18nDirs) { for (String dir : i18nDirs) {
File realDir = new File(ctx.getRealPath(dir)); File realDir = new File(ctx.getRealPath(dir));
if (realDir.isDirectory()) {
Collection<File> files = FileUtils.listFiles(realDir, new RegexFileFilter(prefixesRegex + ".*\\.properties"), DirectoryFileFilter.DIRECTORY); Collection<File> files = FileUtils.listFiles(realDir, new RegexFileFilter(prefixesRegex + ".*\\.properties"), DirectoryFileFilter.DIRECTORY);
for (File file : files) { for (File file : files) {
convert(file); convert(file);
} }
} }
} }
}
private void convert(File file) { private void convert(File file) {
Properties props = new Properties(); Properties props = new Properties();