File tree Expand file tree Collapse file tree 3 files changed +19
-15
lines changed Expand file tree Collapse file tree 3 files changed +19
-15
lines changed Original file line number Diff line number Diff line change 157157 .. config ()[sourceObject .type .. " Suffix" ]
158158 .. " /" .. filePaths [i ], " w" )
159159 end
160- tmpfile .write (tmpContent )
161- tmpfile .close ()
160+ tmpFile .write (tmpContent )
161+ tmpFile .close ()
162162 else
163163 success = false
164164 end
176176 -- create a link that calls the file within the program directory
177177 if sourceObject .type == " program" then
178178 local progamLink = fs .open (sourceObject .name , " w" )
179- progamLink : write (" shell.execute(\" " .. targetDirectory .. sourceObject .name ..
179+ progamLink . write (" shell.execute(\" " .. targetDirectory .. sourceObject .name ..
180180 config ()[sourceObject .type .. " Suffix" ]
181181 .. " /" .. sourceObject .name .. " .lua" .. " \" , ...)" )
182- progamLink : close ()
182+ progamLink . close ()
183183 elseif sourceObject .type == " library" then
184184 local libraryLink = fs .open (targetDirectory .. sourceObject .name .. " .lua" , " w" )
185185 if not libraryLink then
192192 tmpName = tmpName :match (" (.+)%..+$" )
193193 end
194194
195- libraryLink : write (" return require(\" ./" .. config ()[" libraryDirectory" ]
195+ libraryLink . write (" return require(\" ./" .. config ()[" libraryDirectory" ]
196196 .. tmpName .. config ()[sourceObject .type .. " Suffix" ]
197197 .. " /" .. tmpName .. " \" )" )
198- libraryLink : close ()
198+ libraryLink . close ()
199199 end
200200
201201 return sourceObject , true
Original file line number Diff line number Diff line change 136136 end
137137
138138 -- delete file
139- if scriptType and fs .exists (config ()[scriptType .. " Directory" ] .. name .. " .lua" ) then
140- fs .delete (config ()[scriptType .. " Directory" ] .. name .. config ()[scriptType .. " Suffix" ])
139+ local scriptDir = config ()[scriptType .. " Directory" ]
140+ if scriptType and (
141+ fs .exists (scriptDir .. name .. " .lua" ) or
142+ fs .exists (scriptDir .. name .. config ()[scriptType .. " Suffix" ])
143+ ) then
144+ fs .delete (scriptDir .. name .. config ()[scriptType .. " Suffix" ])
141145 if scriptType == " library" then
142- fs .delete (config ()[ scriptType .. " Directory " ] .. name .. " .lua" )
146+ fs .delete (scriptDir .. name .. " .lua" )
143147 end
144148 end
145149
Original file line number Diff line number Diff line change 11--- @class SCM
22SCM = {}
3- require (' libs.scm.config' )
4- require (' libs.scm.net' )
5- require (' libs.scm.log' )
6- require (' libs.scm.scriptManager' )
7- require (' libs.scm.autocomplete' )
8- require (' libs.scm.ui' )
3+ require (' ./ libs.scm.config' )
4+ require (' ./ libs.scm.net' )
5+ require (' ./ libs.scm.log' )
6+ require (' ./ libs.scm.scriptManager' )
7+ require (' ./ libs.scm.autocomplete' )
8+ require (' ./ libs.scm.ui' )
99
1010function SCM :checkVersion ()
1111 if not self .Config .config [" updateAvailable" ] and self .Config .config [" lastVersionCheck" ] ~= ' ' .. os .day (" utc" ) then
You can’t perform that action at this time.
0 commit comments