@@ -50,27 +50,27 @@ func (s *LibrariesLoader) Run(ctx *types.Context) error {
50
50
if err := builtInLibrariesFolders .ToAbs (); err != nil {
51
51
return i18n .WrapError (err )
52
52
}
53
- lm .AddLibrariesDir (libraries .IDEBuiltIn , builtInLibrariesFolders ... )
53
+ for _ , folder := range builtInLibrariesFolders {
54
+ lm .AddLibrariesDir (folder , libraries .IDEBuiltIn )
55
+ }
54
56
55
57
debugLevel := ctx .DebugLevel
56
58
logger := ctx .GetLogger ()
57
59
58
60
actualPlatform := ctx .ActualPlatform
59
61
platform := ctx .TargetPlatform
60
62
if actualPlatform != platform {
61
- if dir := actualPlatform .GetLibrariesDir (); dir != nil {
62
- lm .AddLibrariesDir (libraries .ReferencedPlatformBuiltIn , dir )
63
- }
64
- }
65
- if dir := platform .GetLibrariesDir (); dir != nil {
66
- lm .AddLibrariesDir (libraries .PlatformBuiltIn , dir )
63
+ lm .AddPlatformReleaseLibrariesDir (actualPlatform , libraries .ReferencedPlatformBuiltIn )
67
64
}
65
+ lm .AddPlatformReleaseLibrariesDir (platform , libraries .PlatformBuiltIn )
68
66
69
67
librariesFolders := ctx .OtherLibrariesFolders
70
68
if err := librariesFolders .ToAbs (); err != nil {
71
69
return i18n .WrapError (err )
72
70
}
73
- lm .AddLibrariesDir (libraries .Sketchbook , librariesFolders ... )
71
+ for _ , folder := range librariesFolders {
72
+ lm .AddLibrariesDir (folder , libraries .Sketchbook )
73
+ }
74
74
75
75
if err := lm .RescanLibraries (); err != nil {
76
76
return i18n .WrapError (err )
0 commit comments