From c230a6ac90d19a30ff7bd6cad485fcc6b9583173 Mon Sep 17 00:00:00 2001 From: Jose Diaz-Gonzalez Date: Tue, 10 Mar 2020 22:17:51 -0400 Subject: [PATCH] refactor: always remove --- plugins/apps/triggers.go | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/plugins/apps/triggers.go b/plugins/apps/triggers.go index fbf96e1b3..22ae2f0b9 100644 --- a/plugins/apps/triggers.go +++ b/plugins/apps/triggers.go @@ -31,12 +31,10 @@ func TriggerAppMaybeCreate(appName string) error { func TriggerPostDelete(appName string) error { imageRepo := common.GetAppImageRepo(appName) - if appName != "" { - // remove contents for apps that are symlinks to other folders - os.RemoveAll(fmt.Sprintf("%v/", common.AppRoot(appName))) - // then remove the folder and/or the symlink - os.RemoveAll(common.AppRoot(appName)) - } + // remove contents for apps that are symlinks to other folders + os.RemoveAll(fmt.Sprintf("%v/", common.AppRoot(appName))) + // then remove the folder and/or the symlink + os.RemoveAll(common.AppRoot(appName)) imagesByAppLabel, err := listImagesByAppLabel(appName) if err != nil {