From 25d1f6a83d733b13c83bd80f9863e243ebd09862 Mon Sep 17 00:00:00 2001 From: Maciek Borzecki Date: Wed, 8 Apr 2015 23:18:08 +0200 Subject: [PATCH] core: use APP_NAME when getting user directories --- src/core.vala | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/core.vala b/src/core.vala index a8f773e..ed001e3 100644 --- a/src/core.vala +++ b/src/core.vala @@ -21,6 +21,8 @@ using MConn; class Core : Object { + public static const string APP_NAME = "mconnect"; + public Crypt crypt { get; private set; default = null; } public PacketHandlers handlers {get; private set; default = null; } @@ -55,12 +57,14 @@ class Core : Object { return Core._instance; } - private static string get_storage_dir() { - return Environment.get_user_data_dir() + "/mconnect"; + public static string get_storage_dir() { + return Path.build_filename(Environment.get_user_data_dir(), + APP_NAME); } - private static string get_config_dir() { - return Environment.get_user_config_dir() + "/mconnect"; + public static string get_config_dir() { + return Path.build_filename(Environment.get_user_config_dir(), + APP_NAME); } private static void init_user_dirs() {