summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSebastian Reichel <sre@ring0.de>2013-04-28 21:42:04 +0200
committerSebastian Reichel <sre@ring0.de>2013-04-28 21:42:04 +0200
commit2064ea839e8c84642655a0dbd651797b2ac1eca2 (patch)
treeb9b5742548c7d9b62cf446a21f41e0c73a31fc1b
parentf90cc533f5bb44c73017bd0f9d2591be1e246724 (diff)
downloadserial-barcode-scanner-2064ea839e8c84642655a0dbd651797b2ac1eca2.tar.bz2
improve config file location finding
-rw-r--r--src/config/main.vala4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/config/main.vala b/src/config/main.vala
index aa971d6..566730b 100644
--- a/src/config/main.vala
+++ b/src/config/main.vala
@@ -16,7 +16,9 @@
Cfg cfg;
public static int main(string[] args) {
- cfg = new Cfg("../../ktt-shopsystem.cfg");
+ string binarylocation = File.new_for_path(args[0]).get_parent().get_path();
+
+ cfg = new Cfg(binarylocation + "/../../ktt-shopsystem.cfg");
Bus.own_name(
BusType.SESSION,