Skip to content

Commit

Permalink
Insert node only acutally added in invalidateChildren(at:) (#1689)
Browse files Browse the repository at this point in the history
  • Loading branch information
1024jp committed Sep 4, 2024
1 parent 9b9afd4 commit b518a3d
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions CotEditor/Sources/FileNode.swift
Original file line number Diff line number Diff line change
Expand Up @@ -242,8 +242,13 @@ extension FileNode {
}

} else { // -> fileURL is added
// just invalidate all children
self._children = nil
if let node = try? FileNode(at: fileURL, parent: self) {
self.addNode(node)
} else {
assertionFailure()
// just invalidate all children
self._children = nil
}
return true
}
}
Expand Down

0 comments on commit b518a3d

Please sign in to comment.