You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is Issue 209 moved from a Google Code project.
Added by 2010-02-24T00:56:10.000Z by Matt.M...@gmail.com.
Please review that bug for more context and additional comments, but update this bug.
Closed (Fixed).
Original labels: Type-Defect, Priority-Medium, Milestone-0019, Component-IDE
Original description
Using Arduino 18 on a machine running Ubuntu Karmic, I noticed that the
library complier picks up . files with an extension of .cpp (e.g.
.test.cpp) and tries to compile them. By convention, these sorts of file
are used as temporary buffers for file editors, and I've seen them included
in libraries created by OS X users (who apparently didn't have this issue).
I would expect these files to be ignored.
To reproduce the issue, put a file called .test.cpp in a user library
directory, with the words "test file" in it, then try to compile a sketch
with the library included.
One solution would be to modify the findFilesInFolder() function in
Compiler.java:
Compiler.java
584c584
< if (file.getName().equals(".") || file.getName().equals(".."))
continue;
if (file.getName().startsWith(".")) continue;
So that it looks like this:
static public ArrayList findFilesInFolder(File folder, String
extension,
boolean recurse) {
ArrayList files = new ArrayList();
if (folder.listFiles() == null) return files;
for (File file : folder.listFiles()) {
if (file.getName().startsWith(".")) continue;
if (file.getName().endsWith("." + extension))
files.add(file);
if (recurse && file.isDirectory()) {
files.addAll(findFilesInFolder(file, extension, true));
}
}
return files;
}
The text was updated successfully, but these errors were encountered:
This is Issue 209 moved from a Google Code project.
Added by 2010-02-24T00:56:10.000Z by Matt.M...@gmail.com.
Please review that bug for more context and additional comments, but update this bug.
Closed (Fixed).
Original labels: Type-Defect, Priority-Medium, Milestone-0019, Component-IDE
Original description
Using Arduino 18 on a machine running Ubuntu Karmic, I noticed that the
library complier picks up . files with an extension of .cpp (e.g.
.test.cpp) and tries to compile them. By convention, these sorts of file
are used as temporary buffers for file editors, and I've seen them included
in libraries created by OS X users (who apparently didn't have this issue).
I would expect these files to be ignored.
To reproduce the issue, put a file called .test.cpp in a user library
directory, with the words "test file" in it, then try to compile a sketch
with the library included.
One solution would be to modify the findFilesInFolder() function in
Compiler.java:
Compiler.java
584c584
< if (file.getName().equals(".") || file.getName().equals(".."))
continue;
So that it looks like this:
static public ArrayList findFilesInFolder(File folder, String
extension,
boolean recurse) {
ArrayList files = new ArrayList();
}
The text was updated successfully, but these errors were encountered: