Fix warewulfd api behavior when deleting distribution overlay

Signed-off-by: Jonathon Anderson <janderson@ciq.com>
This commit is contained in:
Jonathon Anderson
2025-08-27 22:02:22 -06:00
parent e609c599a1
commit 6fd858899d
4 changed files with 84 additions and 61 deletions

View File

@@ -16,5 +16,10 @@ func CobraRunE(cmd *cobra.Command, args []string) error {
if err != nil {
return err
}
return myOverlay.DeleteFile(fileName, Force, Parents)
if fileName == "" {
return myOverlay.Delete(Force)
} else {
return myOverlay.DeleteFile(fileName, Force, Parents)
}
}