From cce1953eb1f8fe8c927a1720c95caed45b71ef1d Mon Sep 17 00:00:00 2001 From: Sebastian Reichel Date: Fri, 29 Jun 2018 21:05:46 +0200 Subject: 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. --- src/pdf-invoice/main.vala | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/pdf-invoice/main.vala') diff --git a/src/pdf-invoice/main.vala b/src/pdf-invoice/main.vala index 1848852..4217eb8 100644 --- a/src/pdf-invoice/main.vala +++ b/src/pdf-invoice/main.vala @@ -21,7 +21,8 @@ public static int main(string[] args) { try { 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"); } catch(DBusError e) { error(_("DBus Error: %s\n"), e.message); } catch(IOError e) { -- cgit v1.2.3