mirror of
https://github.com/flatpak/flatpak.git
synced 2026-10-20 22:55:16 -04:00
run: Print errno error code consistently
Commit 352e761c0e started the trend
to print the errno error code when unable to open a file, make all
occurrences where files are opened print the same kind of message.
This commit is contained in:
1 parent
b21f4bf542
commit
135476e69a
1 file changed
+6
-4
@@ -2598,8 +2598,9 @@ flatpak_run_add_app_info_args (GPtrArray *argv_array,
|
||||
fd = g_file_open_tmp ("flatpak-context-XXXXXX", &tmp_path, NULL);
|
||||
if (fd < 0)
|
||||
{
|
||||
g_set_error_literal (error, G_IO_ERROR, g_io_error_from_errno (errno),
|
||||
_("Failed to open flatpak-info temp file"));
|
||||
int errsv = errno;
|
||||
g_set_error (error, G_IO_ERROR, g_io_error_from_errno (errsv),
|
||||
_("Failed to open flatpak-info temp file: %s"), g_strerror (errsv));
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
@@ -2625,8 +2626,9 @@ flatpak_run_add_app_info_args (GPtrArray *argv_array,
|
||||
fd = open (tmp_path, O_RDONLY);
|
||||
if (fd == -1)
|
||||
{
|
||||
g_set_error_literal (error, G_IO_ERROR, g_io_error_from_errno (errno),
|
||||
_("Failed to open temp file"));
|
||||
int errsv = errno;
|
||||
g_set_error (error, G_IO_ERROR, g_io_error_from_errno (errsv),
|
||||
_("Failed to open temp file: %s"), g_strerror (errsv));
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user