projects
/
reactos.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
[KERNEL32]
[reactos.git]
/
reactos
/
dll
/
win32
/
kernel32
/
client
/
file
/
create.c
diff --git
a/reactos/dll/win32/kernel32/client/file/create.c
b/reactos/dll/win32/kernel32/client/file/create.c
index
f823f1f
..
a633f37
100644
(file)
--- a/
reactos/dll/win32/kernel32/client/file/create.c
+++ b/
reactos/dll/win32/kernel32/client/file/create.c
@@
-104,6
+104,7
@@
HANDLE WINAPI CreateFileW (LPCWSTR lpFileName,
ULONG FileAttributes, Flags = 0;
PVOID EaBuffer = NULL;
ULONG EaLength = 0;
ULONG FileAttributes, Flags = 0;
PVOID EaBuffer = NULL;
ULONG EaLength = 0;
+ BOOLEAN TrailingBackslash;
if (!lpFileName || !lpFileName[0])
{
if (!lpFileName || !lpFileName[0])
{
@@
-220,6
+221,13
@@
HANDLE WINAPI CreateFileW (LPCWSTR lpFileName,
}
TRACE("NtPathU \'%wZ\'\n", &NtPathU);
}
TRACE("NtPathU \'%wZ\'\n", &NtPathU);
+
+ TrailingBackslash = FALSE;
+ if (NtPathU.Length >= sizeof(WCHAR) &&
+ NtPathU.Buffer[NtPathU.Length / sizeof(WCHAR) - 1])
+ {
+ TrailingBackslash = TRUE;
+ }
if (hTemplateFile != NULL)
{
if (hTemplateFile != NULL)
{
@@
-350,6
+358,11
@@
HANDLE WINAPI CreateFileW (LPCWSTR lpFileName,
{
SetLastError( ERROR_FILE_EXISTS );
}
{
SetLastError( ERROR_FILE_EXISTS );
}
+ else if (Status == STATUS_FILE_IS_A_DIRECTORY &&
+ TrailingBackslash)
+ {
+ SetLastError(ERROR_PATH_NOT_FOUND);
+ }
else
{
BaseSetLastNTError (Status);
else
{
BaseSetLastNTError (Status);