[winpr,clipboard] fix clipboard file listing
This commit is contained in:
parent
14d5cbeacb
commit
3847035b8e
@ -41,6 +41,7 @@
|
||||
#include <winpr/shell.h>
|
||||
#include <winpr/string.h>
|
||||
#include <winpr/wlog.h>
|
||||
#include <winpr/path.h>
|
||||
#include <winpr/print.h>
|
||||
|
||||
#include "clipboard.h"
|
||||
@ -104,11 +105,7 @@ static struct synthetic_file* make_synthetic_file(const WCHAR* local_name, const
|
||||
goto fail;
|
||||
|
||||
const size_t len = _wcslen(file->remote_name);
|
||||
for (size_t x = 0; x < len; x++)
|
||||
{
|
||||
if (file->remote_name[x] == '/')
|
||||
file->remote_name[x] = '\\';
|
||||
}
|
||||
PathCchConvertStyleW(file->remote_name, len, PATH_STYLE_WINDOWS);
|
||||
|
||||
file->dwFileAttributes = fd.dwFileAttributes;
|
||||
file->ftCreationTime = fd.ftCreationTime;
|
||||
@ -369,8 +366,8 @@ static BOOL add_directory_contents_to_list(wClipboard* clipboard, const WCHAR* l
|
||||
if (!namebuf)
|
||||
return FALSE;
|
||||
|
||||
memcpy(namebuf, local_name, len * sizeof(WCHAR));
|
||||
memcpy(&namebuf[len], wildcard, sizeof(wildcard));
|
||||
_wcsncat(namebuf, local_name, len);
|
||||
_wcsncat(namebuf, wildcard, ARRAYSIZE(wildcard));
|
||||
|
||||
result = do_add_directory_contents_to_list(clipboard, local_name, remote_name, namebuf, files);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user