mirror of
https://github.com/octopusYan/dayz-mod-translator.git
synced 2025-01-31 11:16:43 +08:00
fix: 包内同时有bin和cpp文件时,写入翻译报错
This commit is contained in:
parent
5a9226901f
commit
5214485a36
@ -146,6 +146,10 @@ public class PBOUtil {
|
||||
return wordItems;
|
||||
|
||||
List<File> files = new ArrayList<>(FileUtils.listFiles(file, FILE_NAME_LIST, true));
|
||||
List<String> names = files.stream().map(File::getName).toList();
|
||||
if(names.contains("config.bin") && names.contains("config.cpp")) {
|
||||
files = files.stream().filter(item -> "config.cpp".equals(item.getName())).toList();
|
||||
}
|
||||
for (File item : files) {
|
||||
wordItems.addAll(findWordByFile(item));
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user