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.
tingping/wmclass
Alexander Larsson 2016-11-15 10:44:26 +01:00
parent 2acb3f81a5
commit 3896c8d683
3 changed files with 3 additions and 3 deletions

View File

@ -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)

View File

@ -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)

View File

@ -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)