Skip to content

Commit c836e8c

Browse files
Massimiliano Pippihowjmay
Massimiliano Pippi
authored andcommitted
Avoid calling cloud API if vid or pid are invalid (arduino#439)
* avoid calling cloud API if vid or pid are invalid * user regex
1 parent ef6463b commit c836e8c

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

arduino/libraries/librariesmanager/librariesmanager.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,8 @@ func (sc *LibrariesManager) LoadLibrariesFromDir(librariesDir *LibrariesDir) err
209209
// name and version or, if the version is nil, the library installed
210210
// in the sketchbook.
211211
func (sc *LibrariesManager) FindByReference(libRef *librariesindex.Reference) *libraries.Library {
212-
alternatives, have := sc.Libraries[libRef.Name]
212+
saneName := utils.SanitizeName(libRef.Name)
213+
alternatives, have := sc.Libraries[saneName]
213214
if !have {
214215
return nil
215216
}

0 commit comments

Comments
 (0)