svn commit: trunk/busybox/editors
pgf at busybox.net
pgf at busybox.net
Tue Mar 28 14:18:24 UTC 2006
Author: pgf
Date: 2006-03-28 06:18:21 -0800 (Tue, 28 Mar 2006)
New Revision: 14679
Log:
fix behavior of ZZ, with respect to readonly mode(s). original
patch and report from Alexander Griesser.
Modified:
trunk/busybox/editors/vi.c
Changeset:
Modified: trunk/busybox/editors/vi.c
===================================================================
--- trunk/busybox/editors/vi.c 2006-03-28 07:11:51 UTC (rev 14678)
+++ trunk/busybox/editors/vi.c 2006-03-28 14:18:21 UTC (rev 14679)
@@ -3617,12 +3617,13 @@
indicate_error(c);
break;
}
- if (file_modified
+ if (file_modified) {
#ifdef CONFIG_FEATURE_VI_READONLY
- && ! vi_readonly
- && ! readonly
-#endif /* CONFIG_FEATURE_VI_READONLY */
- ) {
+ if (vi_readonly || readonly) {
+ psbs("\"%s\" File is read only", cfn);
+ break;
+ }
+#endif /* CONFIG_FEATURE_VI_READONLY */
cnt = file_write(cfn, text, end - 1);
if (cnt < 0) {
if (cnt == -1)
More information about the busybox-cvs
mailing list