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