[augeas-devel] augeas: master - * src/augeas.c (aug_init): always create /files
David Lutterkort
lutter at fedoraproject.org
Fri Mar 6 23:07:11 UTC 2009
Gitweb: http://git.fedorahosted.org/git/augeas.git?p=augeas.git;a=commitdiff;h=835e50a424eb1ca40c289e864e121538abb29329
Commit: 835e50a424eb1ca40c289e864e121538abb29329
Parent: 3ce70f278fc34fca07b373137f7a193c7b3ebfdf
Author: David Lutterkort <lutter at redhat.com>
AuthorDate: Fri Mar 6 14:51:44 2009 -0800
Committer: David Lutterkort <lutter at redhat.com>
CommitterDate: Fri Mar 6 15:04:17 2009 -0800
* src/augeas.c (aug_init): always create /files
---
src/augeas.c | 2 ++
tests/test-mv.sh | 2 +-
2 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/src/augeas.c b/src/augeas.c
index cd3da0f..718fb00 100644
--- a/src/augeas.c
+++ b/src/augeas.c
@@ -191,6 +191,8 @@ struct augeas *aug_init(const char *root, const char *loadpath,
} else {
aug_set(result, AUGEAS_META_SAVE_MODE, AUG_SAVE_OVERWRITE_TEXT);
}
+ /* Make sure we always have /files */
+ aug_set(result, AUGEAS_FILES_TREE, NULL);
if (interpreter_init(result) == -1)
goto error;
diff --git a/tests/test-mv.sh b/tests/test-mv.sh
index 5a2c25b..e7832e5 100755
--- a/tests/test-mv.sh
+++ b/tests/test-mv.sh
@@ -2,7 +2,7 @@
aug_mv() {
opts='--nostdinc -r /dev/null'
-(augtool $opts | grep -v '/augeas\|augtool' | tr '\n' ' ') <<EOF
+(augtool $opts | grep -v '/augeas\|/files\|augtool' | tr '\n' ' ') <<EOF
set /a/b/c value
mv $1 $2
print
More information about the augeas-devel
mailing list