From 710343a23c7e6e9c079eafdf3aeea8a40cc2ce61 Mon Sep 17 00:00:00 2001 From: Keith Packard Date: Sun, 8 Dec 2013 20:34:11 -0800 Subject: [PATCH] altosui: Match directories in hex file matcher This makes it possible to navigate around the file system Signed-off-by: Keith Packard --- altosui/AltosFlashUI.java | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/altosui/AltosFlashUI.java b/altosui/AltosFlashUI.java index 7e4cddb1..5ec5ea8a 100644 --- a/altosui/AltosFlashUI.java +++ b/altosui/AltosFlashUI.java @@ -192,7 +192,7 @@ public class AltosFlashUI } public boolean accept(File file) { - return file.getName().startsWith(head) && file.getName().endsWith(".ihx"); + return !file.isFile() || (file.getName().startsWith(head) && file.getName().endsWith(".ihx")); } public String getDescription() { @@ -225,11 +225,8 @@ public class AltosFlashUI if (!device.matchProduct(AltosLib.product_altusmetrum)) { for (int i = 0; i < filters.length; i++) { - System.out.printf ("device %s filter %d\n", device, filters[i].product); - if (device != null && device.matchProduct(filters[i].product)) { - System.out.printf ("select filter %s\n", filters[i].head); + if (device != null && device.matchProduct(filters[i].product)) hexfile_chooser.setFileFilter(filters[i]); - } } } -- 2.30.2