diff options
author | Alexander Larsson <alexl@redhat.com> | 2016-05-04 08:47:38 +0200 |
---|---|---|
committer | Alexander Larsson <alexl@redhat.com> | 2016-05-04 08:47:38 +0200 |
commit | 098e3e426de4faa6cdef92dc5e00e95475481224 (patch) | |
tree | 56241534b5930053ec9dc149b14961349d63738e /builder | |
parent | 3bdae174e9fc95045a24234b004670a456c555db (diff) | |
download | xdg-app-098e3e426de4faa6cdef92dc5e00e95475481224.tar.gz |
build: Look for files in the same dir as the manifest, not in the CWD
This makes more sense, the CWD is not necessary a useful place.
Diffstat (limited to 'builder')
-rw-r--r-- | builder/xdg-app-builder-main.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/builder/xdg-app-builder-main.c b/builder/xdg-app-builder-main.c index 6057458..39dd1d7 100644 --- a/builder/xdg-app-builder-main.c +++ b/builder/xdg-app-builder-main.c @@ -164,6 +164,7 @@ main (int argc, g_autofree gchar *json = NULL; g_autoptr(BuilderContext) build_context = NULL; g_autoptr(GFile) base_dir = NULL; + g_autoptr(GFile) manifest_file = NULL; g_autoptr(GFile) app_dir = NULL; g_autoptr(BuilderCache) cache = NULL; g_autofree char *cache_branch = NULL; @@ -228,7 +229,8 @@ main (int argc, return 1; } - base_dir = g_file_new_for_path (g_get_current_dir ()); + manifest_file = g_file_new_for_path (manifest_path); + base_dir = g_file_get_parent (manifest_file); app_dir = g_file_new_for_path (app_dir_path); build_context = builder_context_new (base_dir, app_dir); |