Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Directory / filename collision when deleting #1105

Closed
deeuu opened this issue Apr 24, 2019 · 8 comments · Fixed by #1450
Closed

Directory / filename collision when deleting #1105

deeuu opened this issue Apr 24, 2019 · 8 comments · Fixed by #1450
Assignees
Labels
bug Defects feature Enhancements and new features storage Storage / FS Backends
Milestone

Comments

@deeuu
Copy link

deeuu commented Apr 24, 2019

Summary

Can't delete secret with same name as directory.

Steps To Reproduce

(edited for brevity)

$ gopass list code
├── github
│   └── deeuu
├── gitlab
│   └── deeuu
├── github
└── gitlab

gopass rm code/github                                                                      
Are you sure you would like to delete code/github? [y/N/q]: y
2019/04/24 10:57:53 Cannot remove 'code/github': Is a directory. Use 'gopass rm -r code/github' to delete

Expected behavior

An option (or alternative command) to delete the secret or directory.

Environment

  • Ubuntu 18.04.1 LTS
  • 4.15.0-47-generic x86_64
  • gopass 1.8.3
  • apt-get
@ndrewtl
Copy link

ndrewtl commented May 15, 2019

I've also experienced the same issue using gopass edit--

Error: failed to encrypt secret ./secretname: a folder named ./secretname already exists

Environment

  • Arch Linux x86_64, Kernel 5.0.13-arch1-1-ARCH
  • gopass 1.8.5 (2019-03-13 17:51:51) go1.12 linux amd64

@martinhoefling
Copy link
Contributor

What would be the expected behavior here? Maybe one also want's prevent the creation of this scenario. What should be deleted first, directory or file?

@martinhoefling martinhoefling added storage Storage / FS Backends feature Enhancements and new features labels Jul 5, 2019
@deeuu
Copy link
Author

deeuu commented Jul 7, 2019

What should be deleted first, directory or file?

I'd like to be asked a question along these lines.

Perhaps something like:

'X' is both a secret and a directory; delete secret? [y/N/q]:

Then, if N

Note: use 'gopass rm -r X' to delete the directory.

@dominikschulz dominikschulz added this to the 1.8.5 - Bugfix release milestone Jul 14, 2019
@dominikschulz dominikschulz self-assigned this Jul 14, 2019
@espoelstra
Copy link

I've hit this when trying to do a gopass mv as well, resulting in fun/weird behaviors. #892 (comment)

@dominikschulz dominikschulz added the bug Defects label Sep 1, 2019
@dominikschulz dominikschulz added this to the 1.8.5 - Bugfix release milestone Sep 1, 2019
@stale
Copy link

stale bot commented Nov 30, 2019

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the wontfix label Nov 30, 2019
@espoelstra
Copy link

Did this get fixed?

@stale stale bot removed the wontfix label Nov 30, 2019
@stale
Copy link

stale bot commented Feb 28, 2020

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the wontfix label Feb 28, 2020
@ndrewtl
Copy link

ndrewtl commented Mar 1, 2020

Bumping because this should be fixed-- the behavior I'd like to see if there's ambiguity, is for gopass to prompt which, directory or file, you'd like to move/delete/etc. If you don't like the prompt, perhaps a config option should exist about which should be picked if there is ambitguity.

@stale stale bot removed the wontfix label Mar 1, 2020
dominikschulz added a commit to dominikschulz/gopass that referenced this issue Jul 17, 2020
Fixes gopasspw#1105

RELEASE_NOTES=[BUGFIX] Allow deleting shadowed secret

Signed-off-by: Dominik Schulz <[email protected]>
dominikschulz added a commit that referenced this issue Jul 17, 2020
Fixes #1105

RELEASE_NOTES=[BUGFIX] Allow deleting shadowed secret

Signed-off-by: Dominik Schulz <[email protected]>
kpitt pushed a commit to kpitt/gopass that referenced this issue Jul 21, 2022
Fixes gopasspw#1105

RELEASE_NOTES=[BUGFIX] Allow deleting shadowed secret

Signed-off-by: Dominik Schulz <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Defects feature Enhancements and new features storage Storage / FS Backends
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants