notepad: New files should be created immediately.
This commit is contained in:
parent
5bf1423c2c
commit
8a73016819
|
@ -702,9 +702,18 @@ static void HandleCommandLine(LPWSTR cmdline)
|
||||||
{
|
{
|
||||||
switch (AlertFileDoesNotExist(file_name)) {
|
switch (AlertFileDoesNotExist(file_name)) {
|
||||||
case IDYES:
|
case IDYES:
|
||||||
|
{
|
||||||
|
|
||||||
|
HANDLE file;
|
||||||
SetFileNameAndEncoding(file_name, ENCODING_ANSI);
|
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();
|
UpdateWindowCaption();
|
||||||
break;
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
case IDNO:
|
case IDNO:
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Reference in New Issue