Github user necouchman commented on a diff in the pull request:
https://github.com/apache/guacamole-server/pull/207#discussion_r238670994
--- Diff: src/protocols/rdp/guac_rdpdr/rdpdr_fs_service.c ---
@@ -153,5 +153,42 @@ void guac_rdpdr_register_fs(guac_rdpdrPlugin* rdpdr,
char* drive_name) {
/* Init data */
device->data = rdp_client->filesystem;
+ /* Init directory for file transfer */
+ int create_fs = 0;
+
+ if (rdp_client) {
+ guac_rdp_settings* settings = rdp_client->settings;
+ if (settings) {
+ create_fs = settings->create_drive_path;
+ }
+ else {
+ guac_client_log(device->rdpdr->client, GUAC_LOG_ERROR,
"No settings.");
+ }
+ }
+ else {
+ guac_client_log(device->rdpdr->client, GUAC_LOG_ERROR, "No rdp
client.");
+ }
+
+ if (create_fs) {
+
+ /* Get filesystem, return error if no filesystem */
+ guac_rdp_fs* fs = rdp_client->filesystem;
+ if (fs == NULL) {
+ guac_client_log(device->rdpdr->client, GUAC_LOG_ERROR,
"No filesystem.");
+ return;
--- End diff --
A couple of issues, here. First, the `rdp_client->filesystem` is already
assigned to `device->data` above - not sure there's any reason to re-assign it,
here? Second, I don't know that the null check is required, here, either. I'd
need to go back and look at the code that calls this `guac_rdpdr_register_fs`
function, but I think it might be previously checked?
---