Skip to content

Commit

Permalink
Allow deleting secret shadowed by a directory (#1450)
Browse files Browse the repository at this point in the history
Fixes #1105

RELEASE_NOTES=[BUGFIX] Allow deleting shadowed secret

Signed-off-by: Dominik Schulz <[email protected]>
  • Loading branch information
dominikschulz authored Jul 17, 2020
1 parent fab354b commit 29f5d22
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion internal/action/delete.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ func (s *Action) Delete(c *cli.Context) error {
return ExitError(ExitUsage, nil, "Usage: %s rm name", s.Name)
}

if !recursive && s.Store.IsDir(ctx, name) {
if !recursive && s.Store.IsDir(ctx, name) && !s.Store.Exists(ctx, name) {
return ExitError(ExitUsage, nil, "Cannot remove '%s': Is a directory. Use 'gopass rm -r %s' to delete", name, name)
}

Expand Down

0 comments on commit 29f5d22

Please sign in to comment.