diff options
| author | Bananeweizen <bananeweizen@gmx.de> | 2013-05-07 07:11:38 +0200 |
|---|---|---|
| committer | Bananeweizen <bananeweizen@gmx.de> | 2013-05-07 07:11:38 +0200 |
| commit | c645ee39ed4bb7fb7b3af9cf87ee5a2ff910c845 (patch) | |
| tree | ad5c55da97aa99070e223615423af7f7d45af6c2 /main | |
| parent | d79e4cee0119b9d2aa9d748594208fe9c2fef32e (diff) | |
| download | cgeo-c645ee39ed4bb7fb7b3af9cf87ee5a2ff910c845.zip cgeo-c645ee39ed4bb7fb7b3af9cf87ee5a2ff910c845.tar.gz cgeo-c645ee39ed4bb7fb7b3af9cf87ee5a2ff910c845.tar.bz2 | |
fix #2702: Don't allow to check ".." in path selection
Diffstat (limited to 'main')
| -rw-r--r-- | main/src/cgeo/geocaching/files/SimpleDirChooser.java | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/main/src/cgeo/geocaching/files/SimpleDirChooser.java b/main/src/cgeo/geocaching/files/SimpleDirChooser.java index 824173c..6b2366c 100644 --- a/main/src/cgeo/geocaching/files/SimpleDirChooser.java +++ b/main/src/cgeo/geocaching/files/SimpleDirChooser.java @@ -186,13 +186,12 @@ public class SimpleDirChooser extends AbstractListActivity { if (currentOption != lastOption) { currentOption.setChecked(true); lastPosition = position; - okButton.setEnabled(true); - okButton.setVisibility(View.VISIBLE); } else { lastPosition = -1; - okButton.setEnabled(false); - okButton.setVisibility(View.INVISIBLE); } + final boolean enabled = currentOption.isChecked() && !currentOption.getName().equals(PARENT_DIR); + okButton.setEnabled(enabled); + okButton.setVisibility(enabled ? View.VISIBLE : View.INVISIBLE); adapter.notifyDataSetChanged(); } } |
