mirror of
https://github.com/reactos/reactos.git
synced 2025-06-15 13:18:28 +00:00
Fixed notepad bug when creating a file on the command line
svn path=/trunk/; revision=18822
This commit is contained in:
parent
26d175e489
commit
13c8c834f2
1 changed files with 3 additions and 4 deletions
|
@ -450,10 +450,10 @@ static void HandleCommandLine(LPWSTR cmdline)
|
||||||
cmdline[lstrlen(cmdline) - 1] = 0;
|
cmdline[lstrlen(cmdline) - 1] = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (FileExists(cmdline))
|
file_name = cmdline;
|
||||||
|
if (FileExists(file_name))
|
||||||
{
|
{
|
||||||
file_exists = TRUE;
|
file_exists = TRUE;
|
||||||
file_name = cmdline;
|
|
||||||
}
|
}
|
||||||
else if (!HasFileExtension(cmdline))
|
else if (!HasFileExtension(cmdline))
|
||||||
{
|
{
|
||||||
|
@ -469,13 +469,12 @@ static void HandleCommandLine(LPWSTR cmdline)
|
||||||
lstrcpyn(buf, cmdline, MAX_PATH - lstrlen(txtW) - 1);
|
lstrcpyn(buf, cmdline, MAX_PATH - lstrlen(txtW) - 1);
|
||||||
lstrcat(buf, txtW);
|
lstrcat(buf, txtW);
|
||||||
file_name = buf;
|
file_name = buf;
|
||||||
file_exists = FileExists(buf);
|
file_exists = FileExists(file_name);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (file_exists)
|
if (file_exists)
|
||||||
{
|
{
|
||||||
file_name = cmdline;
|
|
||||||
DoOpenFile(file_name);
|
DoOpenFile(file_name);
|
||||||
InvalidateRect(Globals.hMainWnd, NULL, FALSE);
|
InvalidateRect(Globals.hMainWnd, NULL, FALSE);
|
||||||
if (opt_print)
|
if (opt_print)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue