mirror of
https://github.com/TalAloni/SMBLibrary.git
synced 2025-08-13 18:59:18 +02:00
NTFileSystemAdapter: ToNTStatus: Return STATUS_OBJECT_PATH_INVALID when Win32 error code is ERROR_BAD_PATHNAME
This commit is contained in:
parent
c4406b6a8f
commit
4c29d5a402
1 changed files with 5 additions and 1 deletions
|
@ -1,4 +1,4 @@
|
||||||
/* Copyright (C) 2014-2017 Tal Aloni <tal.aloni.il@gmail.com>. All rights reserved.
|
/* Copyright (C) 2014-2018 Tal Aloni <tal.aloni.il@gmail.com>. All rights reserved.
|
||||||
*
|
*
|
||||||
* You can redistribute this program and/or modify it under the terms of
|
* You can redistribute this program and/or modify it under the terms of
|
||||||
* the GNU Lesser Public License as published by the Free Software Foundation,
|
* the GNU Lesser Public License as published by the Free Software Foundation,
|
||||||
|
@ -467,6 +467,10 @@ namespace SMBLibrary
|
||||||
// In such case, Windows 7 will delete folder 1 and will expect STATUS_DIRECTORY_NOT_EMPTY if there are files to merge.
|
// In such case, Windows 7 will delete folder 1 and will expect STATUS_DIRECTORY_NOT_EMPTY if there are files to merge.
|
||||||
return NTStatus.STATUS_DIRECTORY_NOT_EMPTY;
|
return NTStatus.STATUS_DIRECTORY_NOT_EMPTY;
|
||||||
}
|
}
|
||||||
|
else if (errorCode == (ushort)Win32Error.ERROR_BAD_PATHNAME)
|
||||||
|
{
|
||||||
|
return NTStatus.STATUS_OBJECT_PATH_INVALID;
|
||||||
|
}
|
||||||
else if (errorCode == (ushort)Win32Error.ERROR_ALREADY_EXISTS)
|
else if (errorCode == (ushort)Win32Error.ERROR_ALREADY_EXISTS)
|
||||||
{
|
{
|
||||||
// According to [MS-FSCC], FileRenameInformation MUST return STATUS_OBJECT_NAME_COLLISION when the specified name already exists and ReplaceIfExists is zero.
|
// According to [MS-FSCC], FileRenameInformation MUST return STATUS_OBJECT_NAME_COLLISION when the specified name already exists and ReplaceIfExists is zero.
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue