Skip to content

Commit

Permalink
Brings back the unintended deletion
Browse files Browse the repository at this point in the history
  • Loading branch information
ebozduman committed Jun 8, 2022
1 parent a13707e commit ebac77f
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion Minio/DataModel/ObjectOperationsArgs.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1772,7 +1772,10 @@ internal override void Validate()
if (PartNumber < 0)
throw new ArgumentOutOfRangeException(nameof(PartNumber), PartNumber,
"Invalid Part number value. Cannot be less than 0");

// Check if only one of filename or stream are initialized
if (!string.IsNullOrWhiteSpace(FileName) && ObjectStreamData != null)
throw new ArgumentException("Only one of " + nameof(FileName) + " or " + nameof(ObjectStreamData) +
" should be set.");
if (!string.IsNullOrWhiteSpace(FileName)) utils.ValidateFile(FileName);
// Check object size when using stream data
if (ObjectStreamData != null && ObjectSize == 0)
Expand Down

0 comments on commit ebac77f

Please sign in to comment.