[augeas-devel] augeas: master - * src/transform.c (transform_save): append newline to old text
David Lutterkort
lutter at fedoraproject.org
Tue Apr 7 20:00:38 UTC 2009
Gitweb: http://git.fedorahosted.org/git/augeas.git?p=augeas.git;a=commitdiff;h=42a3094a1ff61ac2c4e2bb8de6e3443660c658eb
Commit: 42a3094a1ff61ac2c4e2bb8de6e3443660c658eb
Parent: 53cf4cfaabf23ae1079c0c42f27ad97baf9709b6
Author: David Lutterkort <lutter at redhat.com>
AuthorDate: Tue Apr 7 12:58:37 2009 -0700
Committer: David Lutterkort <lutter at redhat.com>
CommitterDate: Tue Apr 7 12:58:37 2009 -0700
* src/transform.c (transform_save): append newline to old text
If we appended a newline to initially load the file, we also need to do
that when we parse the file again during save.
Bug reported by Michael Conigliaro <mike at conigliaro.org>
---
src/transform.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/src/transform.c b/src/transform.c
index b50a9bb..fe4a511 100644
--- a/src/transform.c
+++ b/src/transform.c
@@ -735,6 +735,8 @@ int transform_save(struct augeas *aug, struct tree *xfm,
goto done;
}
+ text = append_newline(text, strlen(text));
+
// FIXME: We might have to create intermediary directories
// to be able to write augnew, but we have no idea what permissions
// etc. they should get. Just the process default ?
More information about the augeas-devel
mailing list