Skip to content

Commit b2d2e34

Browse files
katahiromzlearn-more
authored andcommitted
[CLIPBRD] Clipbrd program should accept the quoted file path (reactos#638)
1 parent cf56e1c commit b2d2e34

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

base/applications/clipbrd/clipbrd.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -409,6 +409,8 @@ static LRESULT WINAPI MainWndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lP
409409

410410
UpdateDisplayMenu();
411411
SetDisplayFormat(0);
412+
413+
DragAcceptFiles(hWnd, TRUE);
412414
break;
413415
}
414416

@@ -733,8 +735,8 @@ int WINAPI wWinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPWSTR lpCmdLi
733735
}
734736

735737
/* If the user provided a path to a clipboard data file, try to open it */
736-
if (lpCmdLine != NULL && *lpCmdLine)
737-
LoadClipboardDataFromFile(lpCmdLine);
738+
if (__argc >= 2)
739+
LoadClipboardDataFromFile(__wargv[1]);
738740

739741
while (GetMessageW(&msg, 0, 0, 0))
740742
{

base/applications/clipbrd/precomp.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
#include <htmlhelp.h>
2626
#include <commdlg.h>
2727
#include <winnls.h>
28+
#include <stdlib.h>
2829

2930
#include "resources.h"
3031
#include "cliputils.h"

0 commit comments

Comments
 (0)