From f4ff04ab307a3d62efc84306711177f28bf791db Mon Sep 17 00:00:00 2001 From: Michael Jumper Date: Tue, 12 Nov 2013 10:52:58 -0800 Subject: [PATCH] Initiate download whenever file written within Download folder. --- src/protocols/rdp/rdp_fs.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/protocols/rdp/rdp_fs.c b/src/protocols/rdp/rdp_fs.c index dc63eaec..c92912c6 100644 --- a/src/protocols/rdp/rdp_fs.c +++ b/src/protocols/rdp/rdp_fs.c @@ -477,6 +477,12 @@ void guac_rdp_fs_close(guac_rdp_fs* fs, int file_id) { file = &(fs->files[file_id]); + /* If file was written to, and it's in the \Download folder, start stream */ + if (file->bytes_written > 0 && + strncmp(file->absolute_path, "\\Download\\", 10) == 0) { + GUAC_RDP_DEBUG(2, "Will download \"%s\"", file->absolute_path); + } + GUAC_RDP_DEBUG(2, "Closed \"%s\" (file_id=%i)", file->absolute_path, file_id);