@@ -20,7 +20,6 @@ import (
20
20
"strings"
21
21
"unicode"
22
22
23
- "github.com/arduino/arduino-cli/i18n"
24
23
f "github.com/arduino/arduino-cli/internal/algorithms"
25
24
"github.com/arduino/go-paths-helper"
26
25
"github.com/pkg/errors"
@@ -30,8 +29,6 @@ import (
30
29
"golang.org/x/text/unicode/norm"
31
30
)
32
31
33
- var tr = i18n .Tr
34
-
35
32
// ObjFileIsUpToDate fixdoc
36
33
func ObjFileIsUpToDate (sourceFile , objectFile , dependencyFile * paths.Path ) (bool , error ) {
37
34
logrus .Debugf ("Checking previous results for %v (result = %v, dep = %v)" , sourceFile , objectFile , dependencyFile )
@@ -160,17 +157,6 @@ func filterOutSCCS(file *paths.Path) bool {
160
157
return ! sourceControlFolders [file .Base ()]
161
158
}
162
159
163
- // filterReadableFiles is a ReadDirFilter that accepts only readable files
164
- func filterReadableFiles (file * paths.Path ) bool {
165
- // See if the file is readable by opening it
166
- f , err := file .Open ()
167
- if err != nil {
168
- return false
169
- }
170
- f .Close ()
171
- return true
172
- }
173
-
174
160
// filterOutHiddenFiles is a ReadDirFilter that exclude files with a "." prefix in their name
175
161
var filterOutHiddenFiles = paths .FilterOutPrefixes ("." )
176
162
@@ -180,7 +166,6 @@ func FindFilesInFolder(dir *paths.Path, recurse bool, extensions ...string) (pat
180
166
filterOutHiddenFiles ,
181
167
filterOutSCCS ,
182
168
paths .FilterOutDirectories (),
183
- filterReadableFiles ,
184
169
)
185
170
if len (extensions ) > 0 {
186
171
fileFilter = paths .AndFilter (
0 commit comments