mirror of
https://github.com/mauiaaron/apple2.git
synced 2024-12-27 06:29:19 +00:00
Ensure that path stack has an absolute path
This commit is contained in:
parent
75ade90c04
commit
f7c8978c79
@ -492,13 +492,20 @@ public class Apple2DisksMenu implements Apple2MenuView {
|
||||
}
|
||||
};
|
||||
|
||||
final String parentDisksDir = disksDir;
|
||||
final boolean parentIsRootPath = isRootPath;
|
||||
|
||||
disksList.setAdapter(adapter);
|
||||
disksList.setOnItemClickListener(new AdapterView.OnItemClickListener() {
|
||||
@Override
|
||||
public void onItemClick(AdapterView<?> parent, View view, final int position, long id) {
|
||||
if (isDirectory[position]) {
|
||||
Log.d(TAG, "Descending to path : " + fileNames[position]);
|
||||
pushPathStack(fileNames[position]);
|
||||
if (parentIsRootPath && !new File(fileNames[position]).isAbsolute()) {
|
||||
pushPathStack(parentDisksDir + File.separator + fileNames[position]);
|
||||
} else {
|
||||
pushPathStack(fileNames[position]);
|
||||
}
|
||||
dynamicSetup();
|
||||
ListView disksList = (ListView) mDisksView.findViewById(R.id.listView_settings);
|
||||
disksList.postInvalidate();
|
||||
|
Loading…
Reference in New Issue
Block a user