Skip to content

Commit

Permalink
Private AppStorage: Allow to access to files directory only (don't al…
Browse files Browse the repository at this point in the history
…low access to internals like shared_preferences & databases)
  • Loading branch information
gsantner committed Nov 20, 2021
1 parent a25e952 commit 2f55001
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -501,6 +501,12 @@ public void run() {
_adapterData.add(new File(folder, "storage"));
}

// Private AppStorage: Allow to access to files directory only (don't allow access to internals like shared_preferences & databases)
if (folder.equals(_context.getFilesDir().getParentFile())) {
_adapterData.clear();
_adapterData.add(new File(folder, "files"));
}

if (folder.getAbsolutePath().equals("/storage")) {
// Scan for /storage/emulated/{0,1,2,..}
for (int i = 0; i < 10; i++) {
Expand Down

0 comments on commit 2f55001

Please sign in to comment.