From 96637b5d19c5273b08cdc138713bc7b3e3a6c0f8 Mon Sep 17 00:00:00 2001 From: Michael Jumper Date: Wed, 6 Nov 2013 15:46:54 -0800 Subject: [PATCH] Create Sent as necessary. --- src/protocols/rdp/rdp_fs.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/protocols/rdp/rdp_fs.c b/src/protocols/rdp/rdp_fs.c index ca55d519..622a04e1 100644 --- a/src/protocols/rdp/rdp_fs.c +++ b/src/protocols/rdp/rdp_fs.c @@ -218,6 +218,14 @@ int guac_rdp_fs_open(guac_rdp_fs* fs, const char* path, /* If creating file within Outbox, prepare for download */ if (strncmp(normalized_path, "\\Outbox\\", 8) == 0) { + /* Ensure \Sent exists */ + int sent_id = guac_rdp_fs_open(fs, "\\Sent", ACCESS_GENERIC_ALL, 0, + DISP_FILE_OPEN_IF, FILE_DIRECTORY_FILE); + if (sent_id < 0) + return sent_id; + + guac_rdp_fs_close(fs, sent_id); + /* Replace \Outbox\ with \Sent\ */ memcpy(normalized_path, "\\Sent\\", 6);