File tree Expand file tree Collapse file tree 1 file changed +13
-4
lines changed Expand file tree Collapse file tree 1 file changed +13
-4
lines changed Original file line number Diff line number Diff line change @@ -179,11 +179,20 @@ function scm:refreshRepoScripts ()
179179 request .close ()
180180
181181 local responseTable = textutils .unserializeJSON (response )
182+
183+ local programSuffix = self .config [" programSuffix" ]
184+ local librarySuffix = self .config [" librarySuffix" ]
185+
182186 for i = 1 , # responseTable , 1 do
183- if string.sub (responseTable [i ][" name" ], - string.len (self .config [" programSuffix" ])) == self .config [" programSuffix" ] then
184- programs [string.sub (responseTable [i ][" name" ], 0 , string.len (responseTable [i ][" name" ])- string.len (self .config [" programSuffix" ]))] = {}
185- elseif string.sub (responseTable [i ][" name" ], - string.len (self .config [" librarySuffix" ])) == self .config [" librarySuffix" ] then
186- libraries [string.sub (responseTable [i ][" name" ], 0 , string.len (responseTable [i ][" name" ])- string.len (self .config [" librarySuffix" ]))] = {}
187+ local scriptName = responseTable [i ][" name" ]
188+ if string.sub (scriptName , - string.len (programSuffix )) == programSuffix then
189+ programs [
190+ string.sub (scriptName , 0 , string.len (scriptName )- string.len (programSuffix ))
191+ ] = {}
192+ elseif string.sub (scriptName , - string.len (librarySuffix )) == librarySuffix then
193+ libraries [
194+ string.sub (scriptName , 0 , string.len (scriptName )- string.len (librarySuffix ))
195+ ] = {}
187196 end
188197 end
189198 scm :log (" Done" )
You can’t perform that action at this time.
0 commit comments