refactor: always remove

This commit is contained in:
Jose Diaz-Gonzalez committed 2020-03-10 22:17:51 -04:00
1 parent 82ad2bbd17
commit c230a6ac90
1 file changed
+4 -6
+4 -6
View File
@@ -31,12 +31,10 @@ func TriggerAppMaybeCreate(appName string) error {
func TriggerPostDelete(appName string) error { func TriggerPostDelete(appName string) error {
imageRepo := common.GetAppImageRepo(appName) imageRepo := common.GetAppImageRepo(appName)
if appName != "" { // remove contents for apps that are symlinks to other folders
// remove contents for apps that are symlinks to other folders os.RemoveAll(fmt.Sprintf("%v/", common.AppRoot(appName)))
os.RemoveAll(fmt.Sprintf("%v/", common.AppRoot(appName))) // then remove the folder and/or the symlink
// then remove the folder and/or the symlink os.RemoveAll(common.AppRoot(appName))
os.RemoveAll(common.AppRoot(appName))
}
imagesByAppLabel, err := listImagesByAppLabel(appName) imagesByAppLabel, err := listImagesByAppLabel(appName)
if err != nil { if err != nil {