NTFileSystemAdapter: ToNTStatus: Return STATUS_OBJECT_NAME_INVALID when Win32 error code is ERROR_INVALID_NAME

This commit is contained in:
Tal Aloni 2019-02-02 16:32:10 +02:00
parent 1f2c7326d4
commit 09ed6e6eb9

View file

@ -1,4 +1,4 @@
/* Copyright (C) 2014-2018 Tal Aloni <tal.aloni.il@gmail.com>. All rights reserved.
/* Copyright (C) 2014-2019 Tal Aloni <tal.aloni.il@gmail.com>. All rights reserved.
*
* 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,
@ -526,6 +526,10 @@ namespace SMBLibrary
{
return NTStatus.STATUS_DISK_FULL;
}
else if (errorCode == (ushort)Win32Error.ERROR_INVALID_NAME)
{
return NTStatus.STATUS_OBJECT_NAME_INVALID;
}
else if (errorCode == (ushort)Win32Error.ERROR_DIR_NOT_EMPTY)
{
// If a user tries to rename folder1 to folder2 when folder2 already exists, Windows 7 will offer to merge folder1 into folder2.