diff --git a/steps/iterate_project.go b/steps/iterate_project.go index 952df87..11b9d86 100644 --- a/steps/iterate_project.go +++ b/steps/iterate_project.go @@ -70,12 +70,13 @@ func (m *CommandModel) iterateDirectory(path string) { } content := buffer[:read] + fileContentBeforeAppend := len(fileContent) fileContent = append(fileContent, content...) if licenseAlreadyExist == -1 { exist := bytes.Index(content, uniqueHeader) if exist != -1 { - licenseAlreadyExist = exist + licenseAlreadyExist = exist + fileContentBeforeAppend } }