[gnome-commander] Do not check if directory is empty if it is actually a symlink



commit 9e5f610dd8d98660d72a1036598d5e1f38b93e9e
Author: Uwe Scholz <u scholz83 gmx de>
Date:   Thu Aug 26 21:24:28 2021 +0200

    Do not check if directory is empty if it is actually a symlink

 src/dialogs/gnome-cmd-delete-dialog.cc | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
---
diff --git a/src/dialogs/gnome-cmd-delete-dialog.cc b/src/dialogs/gnome-cmd-delete-dialog.cc
index 17d91685..237416c8 100644
--- a/src/dialogs/gnome-cmd-delete-dialog.cc
+++ b/src/dialogs/gnome-cmd-delete-dialog.cc
@@ -375,7 +375,8 @@ static GList *remove_items_from_list_to_be_deleted(GList *files)
     for (auto file = files; file; file = file->next)
     {
         auto gnomeCmdFile = (GnomeCmdFile*) file->data;
-        if (gnomeCmdFile->GetGfileAttributeUInt32(G_FILE_ATTRIBUTE_STANDARD_TYPE) == G_FILE_TYPE_DIRECTORY)
+        if (!gnomeCmdFile->GetGfileAttributeBoolean(G_FILE_ATTRIBUTE_STANDARD_IS_SYMLINK)
+            && gnomeCmdFile->GetGfileAttributeUInt32(G_FILE_ATTRIBUTE_STANDARD_TYPE) == 
G_FILE_TYPE_DIRECTORY)
         {
             GError *error;
             error = nullptr;


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