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

Commit e2b4f497 authored by Felipe Leme's avatar Felipe Leme
Browse files

Created initial bugreports dir if it doesn't exist.

BUG: 25752530
Change-Id: Iec65b88231e26aaa62d301a26b2f51cf92651c72
parent f026f82f
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -352,6 +352,10 @@ public class BugreportReceiverTest extends InstrumentationTestCase {
    private String getPath(String file) {
        File rootDir = new ContextWrapper(mContext).getFilesDir();
        File dir = new File(rootDir, BUGREPORTS_DIR);
        if (!dir.exists()) {
            Log.i(TAG, "Creating directory " + dir);
            assertTrue("Could not create directory " + dir, dir.mkdir());
        }
        String path = new File(dir, file).getAbsolutePath();
        Log.v(TAG, "Path for '" + file + "': " + path);
        return path;