mirror of
https://github.com/mitb-archive/filebot
synced 2024-11-15 13:55:03 -05:00
Make sure to create output folder before calling extract() operations
This commit is contained in:
parent
88388f347f
commit
a81d1ae9dc
@ -1,6 +1,7 @@
|
|||||||
package net.filebot.archive;
|
package net.filebot.archive;
|
||||||
|
|
||||||
import static java.util.stream.Collectors.*;
|
import static java.util.stream.Collectors.*;
|
||||||
|
import static net.filebot.util.FileUtilities.*;
|
||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.io.FileFilter;
|
import java.io.FileFilter;
|
||||||
@ -40,9 +41,7 @@ public class FileMapper implements ExtractOutProvider {
|
|||||||
File outputFolder = outputFile.getParentFile();
|
File outputFolder = outputFile.getParentFile();
|
||||||
|
|
||||||
// create parent folder if necessary
|
// create parent folder if necessary
|
||||||
if (!outputFolder.isDirectory() && !outputFolder.mkdirs()) {
|
createFolders(outputFolder);
|
||||||
throw new IOException("Failed to create folder: " + outputFolder);
|
|
||||||
}
|
|
||||||
|
|
||||||
return new FileOutputStream(outputFile);
|
return new FileOutputStream(outputFile);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user