--- glib-2.85.4/gio/glocalfile.c.~1~ 2025-08-22 08:29:34.000000000 -0400 +++ glib-2.85.4/gio/glocalfile.c 2025-09-03 13:37:38.047224783 -0400 @@ -2095,6 +2095,7 @@ char *dirname, *globaldir; GVfsClass *class; GVfs *vfs; + GFile *trash; int errsv; size_t basename_len; GError *my_error = NULL; @@ -2156,7 +2157,7 @@ g_free (path); } - if (checked_st_dev == home_stat.st_dev) + if (1) { is_homedir_trash = TRUE; errno = 0; @@ -2478,8 +2479,8 @@ trashfile = g_build_filename (filesdir, trashname, NULL); g_free (filesdir); - - if (g_rename (local->filename, trashfile) == -1) + trash = g_file_new_for_path(trashfile); + if (!g_file_move (file, trash, 0, cancellable, NULL, NULL, NULL)) { errsv = errno; @@ -2488,6 +2489,7 @@ g_free (trashname); g_free (infofile); g_free (trashfile); + g_object_unref(trash); if (errsv == EXDEV) /* The trash dir was actually on another fs anyway!? @@ -2510,6 +2512,7 @@ class->local_file_moved (vfs, local->filename, trashfile); g_free (trashfile); + g_object_unref(trash); /* TODO: Do we need to update mtime/atime here after the move? */