File tree Expand file tree Collapse file tree 2 files changed +11
-6
lines changed
cc/arduino/contributions/libraries Expand file tree Collapse file tree 2 files changed +11
-6
lines changed Original file line number Diff line number Diff line change @@ -60,7 +60,7 @@ public class LibrariesIndexer {
6060 private LibrariesIndex index ;
6161 private final LibraryList installedLibraries = new LibraryList ();
6262 private final LibraryList installedLibrariesWithDuplicates = new LibraryList ();
63- private List <File > librariesFolders ;
63+ private ArrayList <File > librariesFolders ;
6464 private final File indexFile ;
6565 private final File stagingFolder ;
6666 private File sketchbookLibrariesFolder ;
@@ -101,11 +101,15 @@ private void parseIndex(File file) throws IOException {
101101 }
102102 }
103103
104- public void setLibrariesFolders (List <File > _librariesFolders ) {
104+ public void setLibrariesFolders (ArrayList <File > _librariesFolders ) {
105105 librariesFolders = _librariesFolders ;
106106 rescanLibraries ();
107107 }
108108
109+ public ArrayList <File > getLibrariesFolders () {
110+ return librariesFolders ;
111+ }
112+
109113 public void rescanLibraries () {
110114 // Clear all installed flags
111115 installedLibraries .clear ();
Original file line number Diff line number Diff line change @@ -87,7 +87,7 @@ public class BaseNoGui {
8787 public static Map <String , LibraryList > importToLibraryTable ;
8888
8989 // XXX: Remove this field
90- static private List <File > librariesFolders ;
90+ static private ArrayList <File > librariesFolders ;
9191
9292 static UserNotifier notifier = new BasicUserNotifier ();
9393
@@ -245,7 +245,7 @@ static public String getHardwarePath() {
245245 return getHardwareFolder ().getAbsolutePath ();
246246 }
247247
248- static public List <File > getLibrariesPath () {
248+ static public ArrayList <File > getLibrariesPath () {
249249 return librariesFolders ;
250250 }
251251
@@ -679,8 +679,9 @@ static public void onBoardOrPortChange() {
679679 // Libraries located in the latest folders on the list can override
680680 // other libraries with the same name.
681681 librariesIndexer .setSketchbookLibrariesFolder (getSketchbookLibrariesFolder ());
682- librariesIndexer .setLibrariesFolders (librariesFolders );
683- librariesIndexer .rescanLibraries ();
682+ if (librariesIndexer .getLibrariesFolders () == null || !librariesIndexer .getLibrariesFolders ().equals (librariesFolders )) {
683+ librariesIndexer .setLibrariesFolders (librariesFolders );
684+ }
684685
685686 populateImportToLibraryTable ();
686687 }
You can’t perform that action at this time.
0 commit comments