Fix missing directories
This commit is contained in:
1 parent
539be7399c
commit
3106403a86
1 file changed
+4
@@ -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);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user