[augeas-devel] [PATCH] Only match literal .anon string.
Marc Fournier
marc.fournier at camptocamp.com
Wed Dec 24 08:50:34 UTC 2008
> You actually want 'IniFile.record_re - ".anon"' here, i.e. only exclude
> the literal string '.anon', not any 5 letter word that ends with 'anon'
> - there was actually a tiny bug in the typechecker that reported a
> spurious error withthat change.
That's right yes ! I realized 2 other lenses have the same bug. This patch
corrects this.
Marc
---
lenses/gdm.aug | 2 +-
lenses/php.aug | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/lenses/gdm.aug b/lenses/gdm.aug
index 23b6faa..5ac0bf8 100644
--- a/lenses/gdm.aug
+++ b/lenses/gdm.aug
@@ -28,7 +28,7 @@ let entry = IniFile.entry entry_re sep comment
* We use IniFile.title_label because there can be entries
* outside of sections whose labels would conflict with section names
*************************************************************************)
-let title = IniFile.title ( IniFile.record_re - /.anon/ )
+let title = IniFile.title ( IniFile.record_re - ".anon" )
let record = IniFile.record title entry
let record_anon = [ label ".anon" . ( entry | empty )+ ]
diff --git a/lenses/php.aug b/lenses/php.aug
index 8e0b521..51b0f29 100644
--- a/lenses/php.aug
+++ b/lenses/php.aug
@@ -30,7 +30,7 @@ let entry = IniFile.entry IniFile.entry_re sep comment
* We use IniFile.title_label because there can be entries
* outside of sections whose labels would conflict with section names
*************************************************************************)
-let title = IniFile.title ( IniFile.record_re - /.anon/ )
+let title = IniFile.title ( IniFile.record_re - ".anon" )
let record = IniFile.record title entry
let record_anon = [ label ".anon" . ( entry | empty )+ ]
--
1.5.6.5
More information about the augeas-devel
mailing list