Skip to content

Fix vch imagestore deletion#8615

Merged
wjun merged 1 commit intovmware:masterfrom
wjun:delimagestore
Feb 5, 2020
Merged

Fix vch imagestore deletion#8615
wjun merged 1 commit intovmware:masterfrom
wjun:delimagestore

Conversation

@wjun
Copy link
Contributor

@wjun wjun commented Feb 3, 2020

In VC 7.0, datastore path changes, so we need to
add a new condition.

[specific ci=Group1-Docker-Commands]

Fixes #8613

In VC 7.0, datastore path changes, so we need to
add a new condition.
@wjun wjun requested a review from a team as a code owner February 3, 2020 11:12
}

if len(children) == 1 { // when image store path is given, we need to delete VIC dir too when it is empty.
if len(children) == 1 || len(children) == 0 { // when image store path is given, we need to delete VIC dir too when it is empty.
Copy link
Contributor

@YanzhaoLi YanzhaoLi Feb 5, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not familiar with these code. Which case is || len(children) == 0 for ?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i think it is empty dir

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i think it is empty dir

So in vc7.0, len(children) == 0 or 1 means empty dir, while in vc6.x only len(children) == 1 means empty dir

@wjun wjun merged commit 9becae4 into vmware:master Feb 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Can not remove the custom image store folder when deleting vch in the vsphere7.0

4 participants