From d8f7d348d614360266fb8e16b0e5740b4b99f393 Mon Sep 17 00:00:00 2001 From: Pavel Abramov Date: Tue, 27 Feb 2024 17:50:36 +0100 Subject: [PATCH] Don't delete images dist while clean In case if someone is trying to use local EVE it could lead to repo deletion Signed-off-by: Pavel Abramov --- pkg/eden/eden.go | 5 ----- 1 file changed, 5 deletions(-) diff --git a/pkg/eden/eden.go b/pkg/eden/eden.go index 556112686..53122fe78 100644 --- a/pkg/eden/eden.go +++ b/pkg/eden/eden.go @@ -851,11 +851,6 @@ func CleanContext(eveDist, certsDist, imagesDist, evePID, eveUUID, sdnPID, vmNam return fmt.Errorf("CleanContext: error in %s delete: %s", certsDist, err) } } - if _, err = os.Stat(imagesDist); !os.IsNotExist(err) { - if err = os.RemoveAll(imagesDist); err != nil { - return fmt.Errorf("CleanContext: error in %s delete: %s", imagesDist, err) - } - } if _, err = os.Stat(configSaved); !os.IsNotExist(err) { if err = os.RemoveAll(configSaved); err != nil { return fmt.Errorf("CleanContext: error in %s delete: %s", configSaved, err)