[Xfce4-commits] [xfce/thunar] 01/01: Restoring non-empty folders spawns a warning about modification/restores folder and leaves copy in Trash (bug #13535)
noreply at xfce.org
noreply at xfce.org
Thu Feb 22 22:03:14 CET 2018
This is an automated email from the git hooks/post-receive script.
a l e x p u s h e d a c o m m i t t o b r a n c h x f c e - 4 . 1 2
in repository xfce/thunar.
commit ccc1ea458273eec2e238c34118e4460631349434
Author: vc-01 <vlado.chren at inmail.sk>
Date: Thu Feb 22 21:38:32 2018 +0100
Restoring non-empty folders spawns a warning about modification/restores
folder and leaves copy in Trash (bug #13535)
---
thunar/thunar-transfer-job.c | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/thunar/thunar-transfer-job.c b/thunar/thunar-transfer-job.c
index 82482e0..91df479 100644
--- a/thunar/thunar-transfer-job.c
+++ b/thunar/thunar-transfer-job.c
@@ -856,6 +856,7 @@ thunar_transfer_job_execute (ExoJob *job,
ThunarJobResponse response;
ThunarTransferJob *transfer_job = THUNAR_TRANSFER_JOB (job);
GFileInfo *info;
+ GFileCopyFlags flags;
gboolean parent_exists;
GError *err = NULL;
GList *new_files_list = NULL;
@@ -900,10 +901,15 @@ thunar_transfer_job_execute (ExoJob *job,
if (G_UNLIKELY (info == NULL))
break;
+ flags = G_FILE_COPY_NOFOLLOW_SYMLINKS | G_FILE_COPY_NO_FALLBACK_FOR_MOVE | G_FILE_COPY_ALL_METADATA;
+
/* check if we are moving a file out of the trash */
if (transfer_job->type == THUNAR_TRANSFER_JOB_MOVE
&& thunar_g_file_is_trashed (node->source_file))
{
+ /* Using this flag when moving filled folders out of trash leaves a copy in trash and pops up a warning */
+ flags &= ~G_FILE_COPY_NO_FALLBACK_FOR_MOVE;
+
/* update progress information */
exo_job_info_message (job, _("Trying to restore \"%s\""),
g_file_info_get_display_name (info));
@@ -982,8 +988,7 @@ thunar_transfer_job_execute (ExoJob *job,
g_file_info_get_display_name (info));
if (g_file_move (node->source_file, tp->data,
- G_FILE_COPY_NOFOLLOW_SYMLINKS
- | G_FILE_COPY_NO_FALLBACK_FOR_MOVE,
+ flags,
exo_job_get_cancellable (job),
NULL, NULL, &err))
{
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Xfce4-commits
mailing list