[gnome-commander] Added some generic error output



commit 86f9a3e1df90ecdfa310bab9a5744054083290c4
Author: Uwe Scholz <u scholz83 gmx de>
Date:   Wed Oct 6 21:12:45 2021 +0200

    Added some generic error output

 src/dialogs/gnome-cmd-prepare-xfer-dialog.cc | 2 +-
 src/gnome-cmd-con.cc                         | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/src/dialogs/gnome-cmd-prepare-xfer-dialog.cc b/src/dialogs/gnome-cmd-prepare-xfer-dialog.cc
index 43473e28..13fc96b9 100644
--- a/src/dialogs/gnome-cmd-prepare-xfer-dialog.cc
+++ b/src/dialogs/gnome-cmd-prepare-xfer-dialog.cc
@@ -160,7 +160,7 @@ static void on_ok (GtkButton *button, GnomeCmdPrepareXferDialog *dialog)
                             GError *error = nullptr;
                             if (!gnome_cmd_con_mkdir (con, parent_dir, error))
                             {
-                                gnome_cmd_show_message (*main_win, error->message);
+                                gnome_cmd_show_message (*main_win, error ? error->message : _("Unknown 
error"));
                                 g_error_free(error);
                                 g_free (dest_path);
                                 gtk_widget_destroy (GTK_WIDGET (dialog));
diff --git a/src/gnome-cmd-con.cc b/src/gnome-cmd-con.cc
index 70b2002a..bd7aad3c 100644
--- a/src/gnome-cmd-con.cc
+++ b/src/gnome-cmd-con.cc
@@ -517,7 +517,7 @@ gboolean gnome_cmd_con_mkdir (GnomeCmdCon *con, const gchar *path_str, GError *e
 
     if (!g_file_make_directory (gFile, nullptr, &tmpError))
     {
-        g_warning("g_file_make_directory error: %s\n", tmpError->message);
+        g_warning("g_file_make_directory error: %s\n", tmpError ? tmpError->message : "unknown error");
         g_propagate_error(&error, tmpError);
         return false;
     }


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]