Switch to Files.createDirectories()
This commit is contained in:
parent
fcb855cea9
commit
a1f2b7f8e8
|
@ -180,9 +180,12 @@ public class StoredDirectoryHelper {
|
|||
*/
|
||||
public boolean mkdirs() {
|
||||
if (docTree == null) {
|
||||
// TODO: Use Files.createDirectories() when AGP 8.1 is available:
|
||||
// https://issuetracker.google.com/issues/282544786
|
||||
return Files.exists(ioTree) || ioTree.toFile().mkdirs();
|
||||
try {
|
||||
Files.createDirectories(ioTree);
|
||||
} catch (final IOException e) {
|
||||
Log.e(TAG, "Error while creating directories at " + ioTree, e);
|
||||
}
|
||||
return Files.exists(ioTree);
|
||||
}
|
||||
|
||||
if (docTree.exists()) {
|
||||
|
|
Loading…
Reference in New Issue