Blame SOURCES/0014-vdagent-file-xfers-only-open-the-file-transfer-dir-w.patch

a547b4
From 6705c11d7ec4808e2dc70e7a4875323e2dfd0f62 Mon Sep 17 00:00:00 2001
a547b4
From: =?UTF-8?q?Fabiano=20Fid=C3=AAncio?= <fidencio@redhat.com>
a547b4
Date: Thu, 28 Aug 2014 16:24:04 +0200
a547b4
Subject: [PATCH] vdagent-file-xfers: only open the file transfer dir when all
a547b4
 the files were transferred
a547b4
a547b4
Once transferring multiple files is supported, do not bother the user
a547b4
opening the file transfer directory for each file transferred, just do it
a547b4
when the last file transfer is finished.
a547b4
---
a547b4
 src/vdagent-file-xfers.c | 3 ++-
a547b4
 1 file changed, 2 insertions(+), 1 deletion(-)
a547b4
a547b4
diff --git a/src/vdagent-file-xfers.c b/src/vdagent-file-xfers.c
a547b4
index b792282..4dea6de 100644
a547b4
--- a/src/vdagent-file-xfers.c
a547b4
+++ b/src/vdagent-file-xfers.c
a547b4
@@ -282,7 +282,8 @@ void vdagent_file_xfers_data(struct vdagent_file_xfers *xfers,
a547b4
                 close(task->file_fd);
a547b4
                 task->file_fd = -1;
a547b4
                 if (xfers->open_save_dir &&
a547b4
-                        task->file_xfer_nr == task->file_xfer_total) {
a547b4
+                        task->file_xfer_nr == task->file_xfer_total &&
a547b4
+                        g_hash_table_size(xfers->xfers) == 1) {
a547b4
                     char buf[PATH_MAX];
a547b4
                     snprintf(buf, PATH_MAX, "xdg-open '%s'&", xfers->save_dir);
a547b4
                     status = system(buf);
a547b4
-- 
a547b4
2.1.0
a547b4