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

gopass mv foo bar/ ignores the trailing slash if bar directory doesn't exist yet #3075

Open
jamielinux opened this issue Mar 2, 2025 · 1 comment · May be fixed by #3080
Open

gopass mv foo bar/ ignores the trailing slash if bar directory doesn't exist yet #3075

jamielinux opened this issue Mar 2, 2025 · 1 comment · May be fixed by #3080
Labels
bug Defects

Comments

@jamielinux
Copy link

$ gopass --version
gopass 1.15.15 go1.23.3 linux amd64

Expected behavior

Let's say I want to move secret foo into a subdir so that it's located at bar/foo instead.

The following works:

$ gopass mv foo bar/foo
$ gopass find bar
bar/foo

The following also works if bar directory already exists:

$ gopass mv foo bar/
$ gopass find bar
bar/foo

Actual behavior

If bar directory doesn't exist yet, foo is moved to a file called bar even though we put a trailing slash:

$ gopass mv foo bar/
$ gopass find bar
bar

This happens on both the CLI and the REPL. Seems the trailing slash is just ignored.

Discussion

The behavior of pass is to always create the directory if there's a trailing slash. I feel like this would be better behavior for gopass too, what do you think?

@dominikschulz dominikschulz added the bug Defects label Mar 3, 2025
@dominikschulz
Copy link
Member

The behavior of pass is to always create the directory if there's a trailing slash. I feel like this would be better behavior for gopass too

Yes, I agree. We should fix this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Defects
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants