Merge pull request #375 from litvinovg/translation_converter_fix

Check if provided path is directory in translation converter
This commit is contained in:
Dragan Ivanovic 2023-03-06 14:42:56 +01:00 committed by GitHub
commit c0b48511e2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

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