[gnome-commander/gcmd-1-14] Fix when doing a file rename: Unref the correct GFile instance



commit 60b8c587bd76eb6071b533363bfb7e60e9bd3189
Author: Uwe Scholz <u scholz83 gmx de>
Date:   Sun Apr 3 22:36:51 2022 +0200

    Fix when doing a file rename: Unref the correct GFile instance

 src/gnome-cmd-file.cc | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
---
diff --git a/src/gnome-cmd-file.cc b/src/gnome-cmd-file.cc
index fcb69434..97323eff 100644
--- a/src/gnome-cmd-file.cc
+++ b/src/gnome-cmd-file.cc
@@ -446,8 +446,9 @@ gboolean GnomeCmdFile::rename(const gchar *new_name, GError **error)
         return FALSE;
     }
 
-    g_object_unref(this->gFile);
-    this->gFile = newgFile;
+    g_object_unref(GNOME_CMD_FILE_BASE (this)->gFile);
+    GNOME_CMD_FILE_BASE (this)->gFile = newgFile;
+    this->gFile = GNOME_CMD_FILE_BASE (this)->gFile;
 
     auto gFileInfoNew = g_file_query_info(gFile,
                                           "*",


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