diff --git a/src/protocols/rdp/rdp_fs.c b/src/protocols/rdp/rdp_fs.c index 025ee883..9a1b1edc 100644 --- a/src/protocols/rdp/rdp_fs.c +++ b/src/protocols/rdp/rdp_fs.c @@ -40,20 +40,20 @@ #include #include -guac_rdp_fs* guac_rdp_fs_alloc(guac_client* client, const char* drive_path, int create_drive_path) { +guac_rdp_fs* guac_rdp_fs_alloc(guac_client* client, const char* drive_path, + int create_drive_path) { /* Create drive path if it does not exist */ if (create_drive_path) { guac_client_log(client, GUAC_LOG_DEBUG, - "%s: Creating directory \"%s\".", + "%s: Creating directory \"%s\" if necessary.", __func__, drive_path); - if (mkdir(drive_path, S_IRWXU)) { - if (errno != EEXIST) { - guac_client_log(client, GUAC_LOG_DEBUG, - "%s: mkdir() failed: %s", - __func__, strerror(errno)); - } + /* Log error if directory creation fails */ + if (mkdir(drive_path, S_IRWXU) && errno != EEXIST) { + guac_client_log(client, GUAC_LOG_ERROR, + "Unable to create directory \"%s\": %s", + drive_path, strerror(errno)); } } diff --git a/src/protocols/rdp/rdp_settings.h b/src/protocols/rdp/rdp_settings.h index e77db5a0..e93ab9a1 100644 --- a/src/protocols/rdp/rdp_settings.h +++ b/src/protocols/rdp/rdp_settings.h @@ -156,7 +156,8 @@ typedef struct guac_rdp_settings { char* drive_path; /** - * Whether to automatically create the local system path if it does not exist. + * Whether to automatically create the local system path if it does not + * exist. */ int create_drive_path;