Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion simulator/folder.go
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,9 @@ func folderPutChild(ctx *Context, f *mo.Folder, o mo.Entity) {
// Need to update ChildEntity before Map.Put for ContainerView updates to work properly
f.ChildEntity = append(f.ChildEntity, ctx.Map.reference(o))
ctx.Map.PutEntity(f, o)

if ActiveModel != nil {
ActiveModel.MarkDirty()
}
folderUpdate(ctx, f, o, ctx.Map.AddReference)

switch e := o.(type) {
Expand All @@ -98,6 +100,9 @@ func folderPutChild(ctx *Context, f *mo.Folder, o mo.Entity) {

func folderRemoveChild(ctx *Context, f *mo.Folder, o mo.Reference) {
ctx.Map.Remove(ctx, o.Reference())
if ActiveModel != nil {
ActiveModel.MarkDirty()
}
folderRemoveReference(ctx, f, o)
}

Expand Down
Loading