[gnome-commander] Insert a validation step



commit 7ca6fc376e65ce7d156b31768d47f9e7e374c357
Author: Uwe Scholz <u scholz83 gmx de>
Date:   Mon Aug 23 00:26:02 2021 +0200

    Insert a validation step

 src/dialogs/gnome-cmd-delete-dialog.cc | 3 +++
 1 file changed, 3 insertions(+)
---
diff --git a/src/dialogs/gnome-cmd-delete-dialog.cc b/src/dialogs/gnome-cmd-delete-dialog.cc
index 94721d0a..e17d0281 100644
--- a/src/dialogs/gnome-cmd-delete-dialog.cc
+++ b/src/dialogs/gnome-cmd-delete-dialog.cc
@@ -202,6 +202,9 @@ static gboolean perform_delete_operation_r(DeleteData *deleteData, GList *gnomeC
             gboolean deleted = TRUE;
             gboolean dirIsEmpty = TRUE;
 
+            if (!GNOME_CMD_IS_DIR (gnomeCmdFile))
+                return false;
+
             auto gnomeCmdDir = gnome_cmd_dir_ref (GNOME_CMD_DIR (gnomeCmdFile));
             gnome_cmd_dir_list_files (gnomeCmdDir, FALSE);
             for (GList *subFolderItem = gnome_cmd_dir_get_files (gnomeCmdDir); subFolderItem; subFolderItem 
= subFolderItem->next)


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