We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 973dee8 commit 6cf55a6Copy full SHA for 6cf55a6
internal/arduino/sketch/sketch.go
@@ -174,13 +174,26 @@ func (s *Sketch) supportedFiles() (paths.PathList, error) {
174
return err == nil
175
}
176
177
+ var loopErr error
178
+ explored := map[string]bool{}
179
+ filterLoops := func(p *paths.Path) bool {
180
+ dir := p.Canonical().String()
181
+ if explored[dir] {
182
+ loopErr = errors.New("directories symlink loop detected")
183
+ return false
184
+ }
185
+ explored[dir] = true
186
+ return true
187
188
+
189
files, err := s.FullPath.ReadDirRecursiveFiltered(
190
paths.AndFilter(
191
paths.OrFilter(
192
filterValidExtensions,
193
filterOutBrokenLinks,
194
),
195
filterOutBuildPaths,
196
+ filterLoops,
197
198
199
paths.FilterOutPrefixes("."),
@@ -191,6 +204,9 @@ func (s *Sketch) supportedFiles() (paths.PathList, error) {
204
if err != nil {
205
return nil, err
206
207
+ if loopErr != nil {
208
+ return nil, loopErr
209
210
return files, nil
211
212
AltStyle によって変換されたページ (->オリジナル) / アドレス: モード: デフォルト 音声ブラウザ ルビ付き 配色反転 文字拡大 モバイル
0 commit comments