Skip to content

Commit

Permalink
fix recursive mode
Browse files Browse the repository at this point in the history
  • Loading branch information
giwty authored and giwty committed Sep 24, 2020
1 parent 8e73980 commit 5efc50b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion db/localSwitchFilesDB.go
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,8 @@ func scanFolder(folder string, recursive bool, files *[]ExtendedFileInfo, progre
}

base := strings.Replace(path, info.Name(), "", 1)
if base != folder && !recursive {
if strings.TrimSuffix(base, string(os.PathSeparator)) != strings.TrimSuffix(folder, string(os.PathSeparator)) &&
!recursive {
return nil
}
if progress != nil {
Expand Down

0 comments on commit 5efc50b

Please # to comment.