diff options
author | Sebastian Reichel <sre@ring0.de> | 2018-06-29 21:05:46 +0200 |
---|---|---|
committer | Sebastian Reichel <sre@ring0.de> | 2018-07-15 22:59:57 +0200 |
commit | cce1953eb1f8fe8c927a1720c95caed45b71ef1d (patch) | |
tree | 4ce0e1a234360ebb99f8bf6b6f2fa5d8ab842c55 /src/invoice/invoice.vala | |
parent | 2d532b4a537327d66a15d20dc2e8aaad9b5f1dfc (diff) | |
download | serial-barcode-scanner-cce1953eb1f8fe8c927a1720c95caed45b71ef1d.tar.bz2 |
all: simplify datadir configuration
This simplifies the datadir configuration and removes the expectation,
that the code is executed from the repository. It should now be possible
to install this into the system like any other common Linux application.
Diffstat (limited to 'src/invoice/invoice.vala')
-rw-r--r-- | src/invoice/invoice.vala | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/invoice/invoice.vala b/src/invoice/invoice.vala index f899cb5..1321071 100644 --- a/src/invoice/invoice.vala +++ b/src/invoice/invoice.vala @@ -44,7 +44,8 @@ public class InvoiceImplementation { db = Bus.get_proxy_sync(BusType.SYSTEM, "io.mainframe.shopsystem.Database", "/io/mainframe/shopsystem/database"); pdf = Bus.get_proxy_sync(BusType.SYSTEM, "io.mainframe.shopsystem.InvoicePDF", "/io/mainframe/shopsystem/invoicepdf"); Config cfg = Bus.get_proxy_sync(BusType.SYSTEM, "io.mainframe.shopsystem.Config", "/io/mainframe/shopsystem/config"); - datadir = cfg.get_string("INVOICE", "datadir"); + var datapath = cfg.get_string("GENERAL", "datapath"); + datadir = Path.build_filename(datapath, "invoice"); mailfromaddress = cfg.get_string("MAIL", "mailfromaddress"); treasurermailaddress = cfg.get_string("MAIL", "treasurermailaddress"); shortname = cfg.get_string("GENERAL", "shortname"); |