File tree Expand file tree Collapse file tree 1 file changed +11
-6
lines changed
arduino-core/src/cc/arduino/contributions/packages Expand file tree Collapse file tree 1 file changed +11
-6
lines changed Original file line number Diff line number Diff line change 5555import java .util .*;
5656import java .util .stream .Collectors ;
5757
58+ import static processing .app .I18n .format ;
5859import static processing .app .I18n .tr ;
5960import static processing .app .helpers .filefilters .OnlyDirs .ONLY_DIRS ;
6061
@@ -100,13 +101,17 @@ public void parseIndex() throws Exception {
100101 // Overlay 3rd party indexes
101102 File [] indexFiles = preferencesFolder .listFiles (new TestPackageIndexFilenameFilter (new PackageIndexFilenameFilter (Constants .DEFAULT_INDEX_FILE_NAME )));
102103
103- for (File indexFile : indexFiles ) {
104- try {
105- mergeContributions (indexFile );
106- } catch (JsonProcessingException e ) {
107- System .err .println (I18n .format (tr ("Skipping contributed index file {0}, parsing error occured:" ), indexFile ));
108- System .err .println (e );
104+ if (indexFiles != null ) {
105+ for (File indexFile : indexFiles ) {
106+ try {
107+ mergeContributions (indexFile );
108+ } catch (JsonProcessingException e ) {
109+ System .err .println (format (tr ("Skipping contributed index file {0}, parsing error occured:" ), indexFile ));
110+ System .err .println (e );
111+ }
109112 }
113+ } else {
114+ System .err .println (format (tr ("Error reading package indexes folder: {0}\n (maybe a permission problem?)" ), preferencesFolder ));
110115 }
111116
112117 // Fill tools and toolsDependency cross references
You can’t perform that action at this time.
0 commit comments