From 3896c8d683ea641be8425ecd7879d1c378f82634 Mon Sep 17 00:00:00 2001 From: Alexander Larsson Date: Tue, 15 Nov 2016 10:44:26 +0100 Subject: [PATCH] Support relative pathnames in various --gpg=FILE commandline options We juse use g_file_new_for_commandline_arg instead of g_file_new_for_path. This is somewhat related to https://github.com/flatpak/flatpak/issues/401 but doesn't actually handle the specific case of tilde. --- app/flatpak-builtins-add-remote.c | 2 +- app/flatpak-builtins-build-bundle.c | 2 +- app/flatpak-builtins-install.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/flatpak-builtins-add-remote.c b/app/flatpak-builtins-add-remote.c index cea6bfdff..f1b6f7b96 100644 --- a/app/flatpak-builtins-add-remote.c +++ b/app/flatpak-builtins-add-remote.c @@ -115,7 +115,7 @@ open_source_stream (GInputStream **out_source_stream, } else { - g_autoptr(GFile) file = g_file_new_for_path (opt_gpg_import[ii]); + g_autoptr(GFile) file = g_file_new_for_commandline_arg (opt_gpg_import[ii]); input_stream = G_INPUT_STREAM (g_file_read (file, cancellable, error)); if (input_stream == NULL) diff --git a/app/flatpak-builtins-build-bundle.c b/app/flatpak-builtins-build-bundle.c index 9b41efceb..b04af8fba 100644 --- a/app/flatpak-builtins-build-bundle.c +++ b/app/flatpak-builtins-build-bundle.c @@ -83,7 +83,7 @@ read_gpg_data (GCancellable *cancellable, } else { - g_autoptr(GFile) file = g_file_new_for_path (opt_gpg_file[ii]); + g_autoptr(GFile) file = g_file_new_for_commandline_arg (opt_gpg_file[ii]); input_stream = G_INPUT_STREAM (g_file_read (file, cancellable, error)); if (input_stream == NULL) diff --git a/app/flatpak-builtins-install.c b/app/flatpak-builtins-install.c index 65e49124d..744a9f0e6 100644 --- a/app/flatpak-builtins-install.c +++ b/app/flatpak-builtins-install.c @@ -90,7 +90,7 @@ read_gpg_data (GCancellable *cancellable, } else { - g_autoptr(GFile) file = g_file_new_for_path (opt_gpg_file[ii]); + g_autoptr(GFile) file = g_file_new_for_commandline_arg (opt_gpg_file[ii]); input_stream = G_INPUT_STREAM (g_file_read (file, cancellable, error)); if (input_stream == NULL)