Report STATUS_SHARING_VIOLATION instead of STATUS_FILE_LOCK_CONFLICT on IOException when deleting file

This commit is contained in:
Tal Aloni 2017-01-03 23:11:04 +02:00
parent a9ebf67c16
commit 2b981c769a

View file

@ -384,7 +384,7 @@ namespace SMBLibrary.Server
catch (IOException) catch (IOException)
{ {
System.Diagnostics.Debug.Print("[{0}] NTCreate: Error deleting '{1}'", DateTime.Now.ToString("HH:mm:ss:ffff"), openedFilePath); System.Diagnostics.Debug.Print("[{0}] NTCreate: Error deleting '{1}'", DateTime.Now.ToString("HH:mm:ss:ffff"), openedFilePath);
header.Status = NTStatus.STATUS_FILE_LOCK_CONFLICT; header.Status = NTStatus.STATUS_SHARING_VIOLATION;
return null; return null;
} }
catch (UnauthorizedAccessException) catch (UnauthorizedAccessException)