Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 775c1a2c authored by Treehugger Robot's avatar Treehugger Robot Committed by Gerrit Code Review
Browse files

Merge "Avoid crash on Files app when creating a directory"

parents 418e5a3e f49dfeb6
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -141,7 +141,8 @@ public class CreateDirectoryFragment extends DialogFragment {
                        resolver, mCwd.derivedUri.getAuthority());
                final Uri childUri = DocumentsContract.createDocument(
                        client, mCwd.derivedUri, Document.MIME_TYPE_DIR, mDisplayName);
                return DocumentInfo.fromUri(resolver, childUri);
                DocumentInfo doc = DocumentInfo.fromUri(resolver, childUri);
                return doc.isDirectory() ? doc : null;
            } catch (Exception e) {
                Log.w(TAG, "Failed to create directory", e);
                return null;