Add options for file attributes and create options to open. Fix create disposition of files in directory list.
This commit is contained in:
parent
67c461be40
commit
911746ae24
@ -111,8 +111,9 @@ static void __guac_rdpdr_fs_translate_path(guac_rdpdr_device* device,
|
||||
|
||||
}
|
||||
|
||||
int guac_rdpdr_fs_open(guac_rdpdr_device* device,
|
||||
const char* path, int access, int create_disposition) {
|
||||
int guac_rdpdr_fs_open(guac_rdpdr_device* device, const char* path,
|
||||
int access, int file_attributes, int create_disposition,
|
||||
int create_options) {
|
||||
|
||||
guac_rdpdr_fs_data* data = (guac_rdpdr_fs_data*) device->data;
|
||||
char real_path[GUAC_RDPDR_FS_MAX_PATH];
|
||||
|
@ -239,7 +239,8 @@ int guac_rdpdr_fs_convert_path(const char* parent, const char* rel_path, char* a
|
||||
* if an error occurs.
|
||||
*/
|
||||
int guac_rdpdr_fs_open(guac_rdpdr_device* device, const char* path,
|
||||
int access, int create_disposition);
|
||||
int access, int file_attributes, int create_disposition,
|
||||
int create_options);
|
||||
|
||||
/**
|
||||
* Frees the given file ID, allowing future open operations to reuse it.
|
||||
|
@ -78,23 +78,13 @@ void guac_rdpdr_fs_process_create(guac_rdpdr_device* device,
|
||||
|
||||
/* FIXME: Validate path length */
|
||||
|
||||
/* STUB: create_options */
|
||||
guac_client_log_info(device->rdpdr->client,
|
||||
"%s: STUB: Unused variable: create_options (%i)", __func__,
|
||||
create_options);
|
||||
|
||||
/* STUB: file_attributes */
|
||||
guac_client_log_info(device->rdpdr->client,
|
||||
"%s: STUB: Unused variable: file_attributes (%i)", __func__,
|
||||
file_attributes);
|
||||
|
||||
/* Convert path to UTF-8 */
|
||||
guac_rdp_utf16_to_utf8(Stream_Pointer(input_stream),
|
||||
path, path_length/2 - 1);
|
||||
|
||||
/* Open file */
|
||||
file_id = guac_rdpdr_fs_open(device, path, desired_access,
|
||||
create_disposition);
|
||||
file_id = guac_rdpdr_fs_open(device, path, desired_access, file_attributes,
|
||||
create_disposition, create_options);
|
||||
|
||||
/* Write header */
|
||||
Stream_Write_UINT16(output_stream, RDPDR_CTYP_CORE);
|
||||
@ -499,7 +489,7 @@ void guac_rdpdr_fs_process_query_directory(guac_rdpdr_device* device, wStream* i
|
||||
|
||||
/* Open directory entry */
|
||||
entry_file_id = guac_rdpdr_fs_open(device, entry_path,
|
||||
ACCESS_FILE_READ_DATA, DISP_FILE_OVERWRITE);
|
||||
ACCESS_FILE_READ_DATA, 0, DISP_FILE_OPEN, 0);
|
||||
|
||||
if (entry_file_id >= 0) {
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user