From 1907bdc19d655055ba95e6e885b58a51d6b41862 Mon Sep 17 00:00:00 2001 From: benfry Date: Tue, 27 Mar 2012 00:16:50 +0000 Subject: [PATCH] Base.listFiles does not list recursively if extension is given (issue #718) --- app/src/processing/app/Base.java | 9 ++++++--- core/todo.txt | 4 ++-- todo.txt | 13 ++++++------- 3 files changed, 14 insertions(+), 12 deletions(-) diff --git a/app/src/processing/app/Base.java b/app/src/processing/app/Base.java index e201c05d3..673c8f65d 100644 --- a/app/src/processing/app/Base.java +++ b/app/src/processing/app/Base.java @@ -2639,9 +2639,12 @@ public class Base { if (newPath.startsWith(basePath)) { newPath = newPath.substring(basePath.length()); } - vector.add(newPath); - if (file.isDirectory()) { - listFiles(basePath, newPath, extension, vector); + // only add if no ext or match + if (extension == null || item.toLowerCase().endsWith(extension)) { + vector.add(newPath); + } + if (file.isDirectory()) { // use absolute path + listFiles(basePath, file.getAbsolutePath(), extension, vector); } } } diff --git a/core/todo.txt b/core/todo.txt index 1407e8433..5df7b351b 100644 --- a/core/todo.txt +++ b/core/todo.txt @@ -21,6 +21,8 @@ _ (hopefully fixes flicker issues) _ change PApplet.java javadoc to reflect the change _ Update http://wiki.processing.org/w/Troubleshooting#Flicker _ http://code.google.com/p/processing/issues/detail?id=775 +_ Potential race condition when resizing sketches +_ http://code.google.com/p/processing/issues/detail?id=697 sort out full screen issues X make screenWidth and screenHeight work properly with multiple screens @@ -268,8 +270,6 @@ _ would be nifty if we could convert on the fly to ttf for speed... _ http://code.google.com/p/processing/issues/detail?id=748 _ check on DXFWriter, since it used to subclass P3D _ at least implement is3D? -_ Potential race condition when resizing sketches -_ http://code.google.com/p/processing/issues/detail?id=697 _ sleep time needs to be set *much* higher for dormant applets _ 10s should be fine--no need to keep spinning (bad for android too) _ just call interrupt() when it's time to get back to work diff --git a/todo.txt b/todo.txt index 2fae0695b..ec27f6ff3 100644 --- a/todo.txt +++ b/todo.txt @@ -2,10 +2,15 @@ X fix up some of the error messages inside Compiler X when internal tools crash, don't add them to the menu X (prevents the PDE from locking up on startup) - X renaming .pde to .java (or vice versa) complains X http://code.google.com/p/processing/issues/detail?id=776 X regression from: http://processing.org/bugs/bugzilla/543.html +X handleFindReference in Editor.java should be public for alternative modes (?) +X http://code.google.com/p/processing/issues/detail?id=713 +X seems to have been fixed earlier +X Base.listFiles does not list recursively if extension is given +X this is for fjen/js.. fix already contributed: +X http://code.google.com/p/processing/issues/detail?id=718 _ add redirects from dev.processing.org again, plus dns entry _ old bugs db links no longer working @@ -112,8 +117,6 @@ _ how to catch these? Exception in thread "Animation Thread" java.lang.NoClassDefFoundError: Could not initialize class javax.media.opengl.GLProfile Exception in thread "Animation Thread" java.lang.UnsatisfiedLinkError: no gluegen-rt in java.library.path -_ handleFindReference in Editor.java should be public for alternative modes (?) -_ http://code.google.com/p/processing/issues/detail?id=713 _ play button (and others) no longer highlighting _ http://code.google.com/p/processing/issues/detail?id=688 @@ -207,10 +210,6 @@ _ jer: it's a decent time to start talking abt references/vars _ Export reports "Could not copy source file" (even though it works) _ http://code.google.com/p/processing/issues/detail?id=638 -_ Base.listFiles does not list recursivly if extension is given -_ this is for fjen/js.. fix already contributed: -_ http://code.google.com/p/processing/issues/detail?id=718 - _ launch4j problem - FIXABLE _ no crash when double-clicking a sketch and loading it (?) _ http://code.google.com/p/processing/issues/detail?id=176