Bug in vi-applet: ZZ command does not recognize read-only files

Rob Landley rob at landley.net
Mon Mar 27 19:07:38 UTC 2006


On Monday 27 March 2006 9:32 am, Bernhard Fischer wrote:
> On Mon, Mar 27, 2006 at 08:36:43AM -0500, Paul Fox wrote:
> > > When I open a file in vi and modify it in the buffer (although it's
> > > readonly) and afterwards try to save it using the ":wq" command, I get
> > > the error message that the file is read-only. If I do ":wq!", I get
> > > another error message from the write command itself that the file can't
> > > be written, so far so good.
> > >
> > > When I do the same with the "ZZ" command (which should be an equivalent
> > > to :wq or :x) I don't get an error message that the file is not
> > > writable, vi simply quits and returns 0 to the shell and makes me think
> > > that everything is ok.
> >
> >i'll take a look at this.  when i fixed the read-only behavior of
> >
> >:wq last year, i didn't notice that ZZ had the same problem.
> >
> >i'll look at your ":wn" as well.
>
> I rediffed the :wn patch (see patch #1) and corrected the :version
> command (see patch #2) here:
> http://busybox.net/lists/busybox/2006-March/019494.html
>
> Please apply if you think it makes sense, TIA.

There's no patch attached to this, are you re-pointing me at "patch #2"?

Rob
-- 
Never bet against the cheap plastic solution.



More information about the busybox mailing list