Skip to content

Commit

Permalink
Fixed deadloop
Browse files Browse the repository at this point in the history
  • Loading branch information
gmazzo committed Jan 25, 2023
1 parent d141d67 commit af3e2e4
Showing 1 changed file with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -103,10 +103,11 @@ abstract class CodeOwnersTask : DefaultTask() {

var parent: File? = File(path).parentFile
do {
val parentEntry = ownership[parent?.path ?: ""] ?: continue

if (parentEntry.owners != entry.owners) return true
if (parentEntry in written) return false
val parentEntry = ownership[parent?.path ?: ""]
if (parentEntry != null) {
if (parentEntry.owners != entry.owners) return true
if (parentEntry in written) return false
}

parent = parent?.parentFile
} while (parent != null)
Expand Down

0 comments on commit af3e2e4

Please sign in to comment.