Bug#600481: vim removes contents of encrypted files without warning if gnupg key has expired

James Vega jamessan at debian.org
Sun Oct 17 16:52:44 UTC 2010


reassign 600481 vim-scripts
forcemerge 573440 600481
retitle 573440 [gnupg.vim] Truncates original file when error in gnupg command occurs
thanks

On Sun, Oct 17, 2010 at 10:25:18AM -0400, H. S. wrote:
> Trying to open a gnupg encrypted text file in vim when the GnuPG key is expired results in
> deletion of the contents of the file. Vim gives no warning that the contents will be lost, at
>  least I did not see any. This happened repeatedly until I renewd my gnupg key.

This looks like it may have the same root cause as #573440.  Namely, the way
gnupg.vim is written it doesn't handle an error from gnupg.  I contacted
Markus about that a while ago but haven't heard back from him yet.

I think the proper solution would be to change gnupg.vim to use a BufWriteCmd
autocmd instead of a pair of BufWritePre/BufWritePost autocmds, but I haven't
had a chance to test out such an implementation.

-- 
James
GPG Key: 1024D/61326D40 2003-09-02 James Vega <jamessan at debian.org>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://lists.alioth.debian.org/pipermail/pkg-vim-maintainers/attachments/20101017/b5872666/attachment.pgp>


More information about the pkg-vim-maintainers mailing list