Skip to content

Commit f0491aa

Browse files
author
jan
committed
Missed some cases when no variant folder is used
1 parent 5bb17eb commit f0491aa

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

io.sloeber.core/src/io/sloeber/core/api/BoardDescription.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -513,7 +513,7 @@ public String getMenuItemIDFromMenuItemName(String menuItemName, String menuID)
513513
public IPath getActualVariantPath() {
514514
updateWhenDirty();
515515
String boardVariant = getBoardVariant();
516-
if (boardVariant == null) {
516+
if (boardVariant == null || boardVariant.isBlank()) {
517517
return null;
518518
}
519519
if (myReferencedPlatformVariant == null) {

io.sloeber.core/src/io/sloeber/core/internal/SloeberConfiguration.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -202,6 +202,12 @@ private boolean projectNeedsUpdate() {
202202
}
203203
IFolder arduinoVariantFolder = getArduinoVariantFolder();
204204
IPath variantPath = myBoardDescription.getActualVariantPath();
205+
if(variantPath==null && arduinoVariantFolder==null) {
206+
return false;
207+
}
208+
if(variantPath==null || arduinoVariantFolder==null) {
209+
return true;
210+
}
205211
if ((!variantPath.toFile().exists()) && (arduinoVariantFolder.exists())) {
206212
// System.out.println("projectNeedsUpdate variant Folder exists but sdhould not");
207213
return true;

0 commit comments

Comments
 (0)