File tree 1 file changed +11
-6
lines changed
arduino-core/src/cc/arduino/contributions/packages
1 file changed +11
-6
lines changed Original file line number Diff line number Diff line change 55
55
import java .util .*;
56
56
import java .util .stream .Collectors ;
57
57
58
+ import static processing .app .I18n .format ;
58
59
import static processing .app .I18n .tr ;
59
60
import static processing .app .helpers .filefilters .OnlyDirs .ONLY_DIRS ;
60
61
@@ -100,13 +101,17 @@ public void parseIndex() throws Exception {
100
101
// Overlay 3rd party indexes
101
102
File [] indexFiles = preferencesFolder .listFiles (new TestPackageIndexFilenameFilter (new PackageIndexFilenameFilter (Constants .DEFAULT_INDEX_FILE_NAME )));
102
103
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
+ }
109
112
}
113
+ } else {
114
+ System .err .println (format (tr ("Error reading package indexes folder: {0}\n (maybe a permission problem?)" ), preferencesFolder ));
110
115
}
111
116
112
117
// Fill tools and toolsDependency cross references
You can’t perform that action at this time.
0 commit comments