From a274533f02585851ee1e9a112f37495c9e7b266f Mon Sep 17 00:00:00 2001 From: "Bradley M. Kuhn" Date: Mon, 29 Apr 2013 16:09:29 -0400 Subject: [PATCH] Properly declare Receipt, Invoice, and Statement tags. The Statement, Receipt, and Invoice tags' values should always a be a relative path names. Note that we "check", but do not "assert" that the file name match a standard Unix-like path syntax, without spaces in the file name. --- accounts/config/config-npo.ledger | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/accounts/config/config-npo.ledger b/accounts/config/config-npo.ledger index 188f0e1..ff764e2 100644 --- a/accounts/config/config-npo.ledger +++ b/accounts/config/config-npo.ledger @@ -19,6 +19,24 @@ commodity $ format $1,000.00 nomarket +; ################################# TAGS ################################ + +; The Statement, Receipt, and Invoice tags' values should always a be a +; relative path names. Note that we "check", but do not "assert" that the +; file name match a standard Unix-like path syntax, without spaces in the +; file name. + +tag Statement + assert value =~ /[^\/].+/ + check value =~ /[^\/][^ ]+(\/[^ ])+/ + +tag Receipt + assert value =~ /[^\/].+/ + check value =~ /[^\/][^ ]+(\/[^ ])+/ + +tag Invoice + assert value =~ /[^\/].+/ + check value =~ /[^\/][^ ]+(\/[^ ])+/ ; ############################## GENERAL/SHARED ACCOUNTS #######################