Commit 8a730168 authored by Sebastian Lackner's avatar Sebastian Lackner Committed by Alexandre Julliard

notepad: New files should be created immediately.

parent 5bf1423c
......@@ -702,9 +702,18 @@ static void HandleCommandLine(LPWSTR cmdline)
{
switch (AlertFileDoesNotExist(file_name)) {
case IDYES:
{
HANDLE file;
SetFileNameAndEncoding(file_name, ENCODING_ANSI);
file = CreateFileW(file_name, GENERIC_WRITE, FILE_SHARE_WRITE,
NULL, OPEN_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL);
if (file != INVALID_HANDLE_VALUE) CloseHandle(file);
UpdateWindowCaption();
break;
}
case IDNO:
break;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment