Skip to content

Commit 88aa158

Browse files
committed
Added filter to avoid showing hidden folders in Import Arduino Libraries
When using repos that collect different libraries (like jantje's at https://github.com/jantje/libraries.git), you had the .git folder showing when adding imported libraries. The added condition avoids showing all hidden sub-folders.
1 parent 6849e71 commit 88aa158

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

it.baeyens.arduino.core/src/it/baeyens/arduino/tools/Libraries.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
package it.baeyens.arduino.tools;
22

3+
import java.io.File;
34
import java.util.HashMap;
45
import java.util.Map;
56
import java.util.Map.Entry;
@@ -47,7 +48,8 @@ private static Map<String, IPath> findAllSubFolders(IPath ipath) {
4748
for (String curFolder : children) {
4849
// Get filename of file or directory
4950
IPath LibPath = ipath.append(curFolder);
50-
if (LibPath.toFile().isDirectory()) {
51+
File LibPathFile = LibPath.toFile();
52+
if (LibPathFile.isDirectory() && !LibPathFile.isHidden()) {
5153
ret.put(curFolder, LibPath);
5254
}
5355
}

0 commit comments

Comments
 (0)