You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Cannot delete a folder or file if they have the same name.
When I try to remove the folder, it prompts to confirm, press "yes" but is not removed. No error message.
When I try to remove the file, after confirmation, it prompts:
rm: cannot remove ‘/home/nuno/.password-store//test’: Is a directory
A folder can be created with same name of an already existing file.
The way pass and qtpass store the files is with .gpg as a suffix.
On the filesystem you have the folder aaa and the file aaa.gpg that's why in "native" mode where qtpass handles everything you can delete the file and folder separately.
Aparently pass first checks for the file aaa.gpg and then tries to delete the folder aaa instead without the -r appended to the rm causing the error messag described.
I'll do some more testing and take this up with the pass maintainer.
Let's do this proper . . pass add test-159
I enter "test" pass add test-159/test
I enter "test 2" pass test-159
It returns "test" pass rm test-159
rm: /Users/annejan/.password-store/test-159: is a directory
I also tested order of creation (first folder or first file) doesn't matter, you can do either.
Adding a / to the request doesn't help to make pass know it's a folder either.
$ pass rm test-159/
Are you sure you would like to delete test-159/? [y/N] y
rm: /Users/annejan/.password-store/test-159: is a directory
The only thing to do in pass is first delete the folder contents, folder gets deleted automagically.
Then delete the file.
$ pass rm test-159/test
Are you sure you would like to delete test-159/test? [y/N] y
$ pass rm test-159/
Error: test-159/ is not in the password store.
$ pass rm test-159
Are you sure you would like to delete test-159? [y/N] y
I think I have now described all the ways in which pass is behaving inconsistently with regard to this bug.
Nice find @keitalbame
On the passwordstore.org mailinglist @dashohoxha replied that you can pass mv to resolve the issue.
He is right, it moves the folder (thought I'd check which gets moved)
QtPass currently doesn't support moving passwords #116
Some more funny pass quirks.
For example pass insert insert
Which can't be read with pass insert shows you the usage information, pass show git does work of-course. Which is the way QtPass uses pass.
Pass will let you create other interesting entries like showaddrmgit etc..
After I get through the enormous backlog of mailing list inquiries about various things, I'll release a new version that contains this fix. Thanks for bringing it to my attention.
Activity
annejan commentedon Feb 4, 2016
Are you using
passornative git/gpgin QtPass?I can imagine this being a
passissue rather than a QtPass issue (will have a try) and might escalate to the password-store mailinglist.AFAICR
passdoesn't like tormthem because it takes off the.gpgname from the file.keitalbame commentedon Feb 4, 2016
Just tested after changing to
native git/gpgI was able to remove the files and folder.I noticed that there is a extra / after .password-store.
Using pass on the cli gave a similar result, but with only one /
I'm on Arch.
mexus commentedon Feb 4, 2016
How is it even possible? I'm on
ext4:annejan commentedon Feb 4, 2016
The way pass and qtpass store the files is with
.gpgas a suffix.On the filesystem you have the folder
aaaand the fileaaa.gpgthat's why in "native" mode where qtpass handles everything you can delete the file and folder separately.Aparently pass first checks for the file
aaa.gpgand then tries to delete the folderaaainstead without the-rappended to thermcausing the error messag described.I'll do some more testing and take this up with the
passmaintainer.annejan commentedon Feb 4, 2016
Let's do this proper . .
pass add test-159I enter "test"
pass add test-159/testI enter "test 2"
pass test-159It returns "test"
pass rm test-159rm: /Users/annejan/.password-store/test-159: is a directory
I also tested order of creation (first folder or first file) doesn't matter, you can do either.
annejan commentedon Feb 4, 2016
Adding a / to the request doesn't help to make pass know it's a folder either.
The only thing to do in pass is first delete the folder contents, folder gets deleted automagically.
Then delete the file.
I think I have now described all the ways in which
passis behaving inconsistently with regard to this bug.Nice find @keitalbame
On the passwordstore.org mailinglist @dashohoxha replied that you can
pass mvto resolve the issue.He is right, it moves the folder (thought I'd check which gets moved)
QtPass currently doesn't support moving passwords #116
annejan commentedon Feb 4, 2016
Some more funny
passquirks.For example
pass insert insertWhich can't be read with
pass insertshows you the usage information,pass show gitdoes work of-course. Which is the way QtPass usespass.Pass will let you create other interesting entries like
showaddrmgitetc..zx2c4 commentedon Feb 5, 2016
Fixed upstream here:
http://git.zx2c4.com/password-store/commit/?id=90373f042e8ce679870c1868cb0957fb825d00d5
With the change, this will delete the directory:
While this will delete the file:
The difference is the trailing slash.
After I get through the enormous backlog of mailing list inquiries about various things, I'll release a new version that contains this fix. Thanks for bringing it to my attention.
annejan commentedon Feb 5, 2016
👍 awesome!!
keitalbame commentedon Feb 5, 2016
I was just adding and removing files and folders, to see how it works and had this behaviour.
Good to know that I could help and will be fixed on next version :)