Centralize managed state targets
This commit is contained in:
@@ -181,22 +181,10 @@ func (b *Backend) DeleteManagedBundle(ctx context.Context, bundlePath string, ma
|
||||
if err := ctx.Err(); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := storage.ValidatePrefix(bundlePath); err != nil {
|
||||
return err
|
||||
}
|
||||
targets := make([]string, 0, len(managedOutputPaths)+1)
|
||||
for _, outputPath := range managedOutputPaths {
|
||||
target, err := storage.Join(bundlePath, outputPath)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
targets = append(targets, target)
|
||||
}
|
||||
statePath, err := storage.StatePath(bundlePath)
|
||||
targets, err := storage.ManagedBundleTargets(bundlePath, managedOutputPaths)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
targets = append(targets, statePath)
|
||||
|
||||
for _, target := range targets {
|
||||
if _, ok := b.dirs[target]; ok {
|
||||
|
||||
Reference in New Issue
Block a user