Fix missing directories
This commit is contained in:
parent
539be7399c
commit
3106403a86
@ -24,6 +24,10 @@ public class FileSaver extends BaseIoSaver {
|
||||
|
||||
@NonNull
|
||||
protected FileOutputStream getOutputStream() throws FileNotFoundException {
|
||||
final File dir = file.getParentFile();
|
||||
if (dir != null && !dir.exists()) {
|
||||
dir.mkdirs();
|
||||
}
|
||||
return new FileOutputStream(file);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user