File tree Expand file tree Collapse file tree 1 file changed +9
-6
lines changed
src/plugins/terminal/src/android Expand file tree Collapse file tree 1 file changed +9
-6
lines changed Original file line number Diff line number Diff line change 2424public class AlpineDocumentProvider extends DocumentsProvider {
2525
2626 private static final String ALL_MIME_TYPES = "*/*" ;
27- private static final File BASE_DIR = new File ("/data/data/com.foxdebug.acode/files/public" );
2827
29- public AlpineDocumentProvider (){
30- if (!BASE_DIR .exists ()) {
31- BASE_DIR .mkdirs ();
32- }
33- }
3428
3529 // The default columns to return information about a root if no specific
3630 // columns are requested in a query.
@@ -58,6 +52,11 @@ public AlpineDocumentProvider(){
5852
5953 @ Override
6054 public Cursor queryRoots (String [] projection ) {
55+ File BASE_DIR = new File (getContext ().getFilesDir (),"public" );
56+ if (!BASE_DIR .exists ()) {
57+ BASE_DIR .mkdirs ();
58+ }
59+
6160 MatrixCursor result = new MatrixCursor (
6261 projection != null ? projection : DEFAULT_ROOT_PROJECTION
6362 );
@@ -185,6 +184,10 @@ public Cursor querySearchDocuments(
185184 String query ,
186185 String [] projection
187186 ) throws FileNotFoundException {
187+ File BASE_DIR = new File (getContext ().getFilesDir (),"public" );
188+ if (!BASE_DIR .exists ()) {
189+ BASE_DIR .mkdirs ();
190+ }
188191 MatrixCursor result = new MatrixCursor (
189192 projection != null ? projection : DEFAULT_DOCUMENT_PROJECTION
190193 );
You can’t perform that action at this time.
0 commit comments