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

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