Skip to content

Commit 998741d

Browse files
committed
Add RealName filed to struct Library
As of now, Library.Name maps to the folder it resides in, not the name declared in library.properties It could be a bug or a feature, anyway since need to we use the real library name, extract it and save in the structure
1 parent 89d7d39 commit 998741d

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

Diff for: src/arduino.cc/builder/libraries_loader.go

+1
Original file line numberDiff line numberDiff line change
@@ -184,6 +184,7 @@ func makeNewLibrary(libraryFolder string, debugLevel int, logger i18n.Logger) (*
184184
library.License = libProperties[constants.LIBRARY_LICENSE]
185185

186186
library.Name = filepath.Base(libraryFolder)
187+
library.RealName = strings.TrimSpace(libProperties[constants.LIBRARY_NAME])
187188
library.Version = strings.TrimSpace(libProperties[constants.LIBRARY_VERSION])
188189
library.Author = strings.TrimSpace(libProperties[constants.LIBRARY_AUTHOR])
189190
library.Maintainer = strings.TrimSpace(libProperties[constants.LIBRARY_MAINTAINER])

Diff for: src/arduino.cc/builder/types/types.go

+1
Original file line numberDiff line numberDiff line change
@@ -168,6 +168,7 @@ type Library struct {
168168
UtilityFolder string
169169
Layout LibraryLayout
170170
Name string
171+
RealName string
171172
Archs []string
172173
DotALinkage bool
173174
Precompiled bool

0 commit comments

Comments
 (0)