Check if pathExists before performing Unmount
This commit is contained in:
@@ -254,13 +254,7 @@ func (c *gitRepoVolumeUnmounter) TearDown() error {
|
||||
|
||||
// TearDownAt simply deletes everything in the directory.
|
||||
func (c *gitRepoVolumeUnmounter) TearDownAt(dir string) error {
|
||||
|
||||
// Wrap EmptyDir, let it do the teardown.
|
||||
wrapped, err := c.plugin.host.NewWrapperUnmounter(c.volName, wrappedVolumeSpec(), c.podUID)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
return wrapped.TearDownAt(dir)
|
||||
return volume.UnmountViaEmptyDir(dir, c.plugin.host, c.volName, wrappedVolumeSpec(), c.podUID)
|
||||
}
|
||||
|
||||
func getVolumeSource(spec *volume.Spec) (*v1.GitRepoVolumeSource, bool) {
|
||||
|
Reference in New Issue
Block a user