mirror of
https://github.com/syncthing/syncthing-android.git
synced 2024-12-22 19:01:30 +00:00
Fixed crash when navigating to folder without read permissions (fixes #244).
This commit is contained in:
parent
ca2ca8553a
commit
b7459c9ded
1 changed files with 4 additions and 0 deletions
|
@ -179,6 +179,10 @@ public class FolderPickerActivity extends SyncthingActivity
|
|||
mLocation = folder;
|
||||
mFilesAdapter.clear();
|
||||
File[] contents = mLocation.listFiles();
|
||||
// In case we don't have read access to the folder, just display nothing.
|
||||
if (contents == null)
|
||||
contents = new File[]{};
|
||||
|
||||
Arrays.sort(contents, new Comparator<File>() {
|
||||
public int compare(File f1, File f2) {
|
||||
if (f1.isDirectory() && f2.isFile())
|
||||
|
|
Loading…
Reference in a new issue