From 93fbd58aa5d18e0506ae878e2630b8f8ca548972 Mon Sep 17 00:00:00 2001
From: Max Christian Pohle <webmaster@coderonline.de>
Date: Sun, 14 Mar 2021 14:35:57 +0100
Subject: [PATCH] Removed 'the root folder has no parent' dialog box

---
 thunar/thunar-window.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/thunar/thunar-window.c b/thunar/thunar-window.c
index 28ab07139..20ef3e2dd 100644
--- a/thunar/thunar-window.c
+++ b/thunar/thunar-window.c
@@ -3140,7 +3140,11 @@ thunar_window_action_go_up (ThunarWindow *window)
     }
   else
     {
-      thunar_dialogs_show_error (GTK_WIDGET (window), error, _("Failed to open parent folder"));
+      /* the root folder '/' has no parent. In this special case we do not need a dialog */
+      if (error->code != G_FILE_ERROR_NOENT)
+        {
+          thunar_dialogs_show_error (GTK_WIDGET (window), error, _("Failed to open parent folder"));
+        }
       g_error_free (error);
     }
 }
-- 
GitLab