mirror of
https://github.com/RatzzFatzz/MKVAudioSubtitleChanger.git
synced 2026-02-11 02:05:56 +01:00
[FIX] close scanner
This commit is contained in:
@@ -18,9 +18,9 @@ public class AttributeUpdaterKernel {
|
|||||||
|
|
||||||
public void execute() {
|
public void execute() {
|
||||||
List<AttributeConfig> configPattern = ConfigUtil.loadConfig();
|
List<AttributeConfig> configPattern = ConfigUtil.loadConfig();
|
||||||
Scanner scanner = new Scanner(System.in);
|
|
||||||
System.out.println("Please enter the path to the files which should be updated: ");
|
|
||||||
List<File> allValidPaths = null;
|
List<File> allValidPaths = null;
|
||||||
|
try(Scanner scanner = new Scanner(System.in)){
|
||||||
|
System.out.println("Please enter the path to the files which should be updated: ");
|
||||||
do{
|
do{
|
||||||
allValidPaths = collector.loadFiles(scanner.nextLine());
|
allValidPaths = collector.loadFiles(scanner.nextLine());
|
||||||
if(allValidPaths == null){
|
if(allValidPaths == null){
|
||||||
@@ -28,7 +28,7 @@ public class AttributeUpdaterKernel {
|
|||||||
}
|
}
|
||||||
}while(allValidPaths == null);
|
}while(allValidPaths == null);
|
||||||
log.info(allValidPaths.size() + " files where found and will now be processed!");
|
log.info(allValidPaths.size() + " files where found and will now be processed!");
|
||||||
|
}
|
||||||
for(File file : allValidPaths){
|
for(File file : allValidPaths){
|
||||||
List<FileAttribute> attributes = collector.loadAttributes(file);
|
List<FileAttribute> attributes = collector.loadAttributes(file);
|
||||||
for(AttributeConfig config : configPattern){
|
for(AttributeConfig config : configPattern){
|
||||||
|
|||||||
Reference in New Issue
Block a user