Bug#492519: vim-runtime: newrw explorer potentially deletes wrong files

Teemu Likonen tlikonen at iki.fi
Sat Jul 26 19:24:27 UTC 2008


Package: vim-runtime
Version: 1:7.1.314-3
Severity: serious

Netrw explorer currently shipped with Debian Sid can potentially cause
data loss since in certain situations it may delete unintended files.
The problem is in the short listing mode. How to reproduce:

    $ mkdir tmpdir
    $ cd tmpdir
    $ touch foo1 foo2 foo3
    $ vim .

Change to short listing mode by pressing "i" a couple of times. Hide all 
the dot files (Ctrl-H and enter ^\.). The directory should look like 
this:
    
    " ============================================================================
    " Netrw Directory Listing                                        (netrw v125)
    "   /home/dtw/tmp
    "   Sorted by      name
    "   Sort sequence: [\/]$,\.h$,\.c$,\.cpp$,*,\.o$,\.obj$,\.info$,\.swp$,\.bak$,\~$
    "   Hiding:        ^\.
    "   Quick Help: <F1>:help  -:go up dir  D:delete  R:rename  s:sort-by  x:exec
    " ============================================================================
    foo1  foo2  foo3

Now move the cursor to either file "foo2" or "foo3" and press "D" 
(delete). You'll see a question which asks if you want to delete _foo1_:

    Confirm deletion of file</home/dtw/tmpdir/foo1> [{y(es)},n(o),a(ll),q(uit)]

If user don't pay attention a wrong file gets deleted.




-- System Information:
Debian Release: lenny/sid
  APT prefers unstable
  APT policy: (500, 'unstable'), (1, 'experimental')
Architecture: i386 (i686)

Kernel: Linux 2.6.18-6-k7 (SMP w/1 CPU core)
Locale: LANG=fi_FI.UTF-8, LC_CTYPE=fi_FI.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash

vim-runtime depends on no packages.

Versions of packages vim-runtime recommends:
ii  vim-gtk [vim]             1:7.1.314-3+b1 Vi IMproved - enhanced vi editor -

vim-runtime suggests no packages.

-- no debconf information





More information about the pkg-vim-maintainers mailing list