Skip to content

Commit 1c8e7ff

Browse files
authored
Merge pull request #118 from GoASTScanner/issue/117
Fix recursive case on Windows platforms
2 parents 72caf3d + 1c99e45 commit 1c8e7ff

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

main.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -231,14 +231,14 @@ func main() {
231231
func getFilesToAnalyze(paths []string, excluded *fileList) []string {
232232
//log.Println("getFilesToAnalyze: start")
233233
var toAnalyze []string
234-
for _, path := range paths {
234+
for _, relativePath := range paths {
235235
//log.Printf("getFilesToAnalyze: processing \"%s\"\n", path)
236236
// get the absolute path before doing anything else
237-
path, err := filepath.Abs(path)
237+
path, err := filepath.Abs(relativePath)
238238
if err != nil {
239239
log.Fatal(err)
240240
}
241-
if filepath.Base(path) == "..." {
241+
if filepath.Base(relativePath) == "..." {
242242
toAnalyze = append(
243243
toAnalyze,
244244
listFiles(filepath.Dir(path), recurse, excluded)...,

0 commit comments

Comments
 (0)