mirror of https://github.com/FreeRDP/FreeRDP
channels: windows patches from richterger
This commit is contained in:
parent
8f10d3aa3b
commit
bf03aff5d1
|
@ -24,7 +24,7 @@ set(${MODULE_PREFIX}_SRCS
|
|||
disk_main.c)
|
||||
|
||||
if(WIN32)
|
||||
set(${MODULE_PREFIX}_SRCS
|
||||
set(${MODULE_PREFIX}_SRCS ${${MODULE_PREFIX}_SRCS}
|
||||
statvfs.c
|
||||
statvfs.h
|
||||
dirent.h)
|
||||
|
|
|
@ -85,17 +85,27 @@ static boolean disk_file_wildcard_match(const char* pattern, const char* filenam
|
|||
|
||||
static void disk_file_fix_path(char* path)
|
||||
{
|
||||
int len;
|
||||
int i;
|
||||
int length;
|
||||
|
||||
len = strlen(path);
|
||||
for (i = 0; i < len; i++)
|
||||
length = strlen(path);
|
||||
|
||||
for (i = 0; i < length; i++)
|
||||
{
|
||||
if (path[i] == '\\')
|
||||
path[i] = '/';
|
||||
}
|
||||
if (len > 0 && path[len - 1] == '/')
|
||||
path[len - 1] = '\0';
|
||||
|
||||
#ifdef WIN32
|
||||
if ((length == 3) && (path[1] == ':') && (path[2] == '/'))
|
||||
return;
|
||||
#else
|
||||
if ((length == 1) && (path[0] == '/'))
|
||||
return;
|
||||
#endif
|
||||
|
||||
if ((length > 0) && (path[length - 1] == '/'))
|
||||
path[length - 1] = '\0';
|
||||
}
|
||||
|
||||
static char* disk_file_combine_fullpath(const char* base_path, const char* path)
|
||||
|
|
|
@ -529,6 +529,8 @@ static void disk_process_irp_device_control(DISK_DEVICE* disk, IRP* irp)
|
|||
|
||||
static void disk_process_irp(DISK_DEVICE* disk, IRP* irp)
|
||||
{
|
||||
irp->IoStatus = STATUS_SUCCESS;
|
||||
|
||||
switch (irp->MajorFunction)
|
||||
{
|
||||
case IRP_MJ_CREATE:
|
||||
|
|
|
@ -932,7 +932,8 @@ static void freerdp_channels_process_sync(rdpChannels* channels, freerdp* instan
|
|||
lchannel_data->open_event_proc(lchannel_data->open_handle,
|
||||
CHANNEL_EVENT_WRITE_COMPLETE, item->UserData, sizeof(void*), sizeof(void*), 0);
|
||||
}
|
||||
xfree(item);
|
||||
|
||||
_aligned_free(item);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -56,6 +56,7 @@ int freerdp_UnicodeToAsciiAlloc(const WCHAR* wstr, CHAR** str, int length)
|
|||
*str = malloc((length * 2) + 1);
|
||||
|
||||
WideCharToMultiByte(CP_UTF8, 0, wstr, length, *str, length, NULL, NULL);
|
||||
(*str)[length] = 0;
|
||||
|
||||
return length;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue