From ebe18aa02d9238f47ee8ff9765db3d015765b3b7 Mon Sep 17 00:00:00 2001 From: Hanno Heinrichs Date: Wed, 16 Mar 2016 17:51:22 +0100 Subject: [PATCH] Initialize root_directory with absolute path --- libinfinity/server/infd-filesystem-storage.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/libinfinity/server/infd-filesystem-storage.c b/libinfinity/server/infd-filesystem-storage.c index 3f6c1e68..c55ed8fb 100644 --- a/libinfinity/server/infd-filesystem-storage.c +++ b/libinfinity/server/infd-filesystem-storage.c @@ -127,6 +127,14 @@ infd_filesystem_storage_set_root_directory(InfdFilesystemStorage* storage, } else { + if (!g_path_is_absolute(converted)) + { + gchar* cwd = g_get_current_dir(); + gchar* full_path = g_build_filename(cwd, converted, NULL); + g_free(cwd); + g_free(converted); + converted = full_path; + } if(!inf_file_util_create_directory(converted, 0755, &error)) { g_warning(