Skip to content

Commit

Permalink
DeleteSourceFile if updated to oneliner
Browse files Browse the repository at this point in the history
  • Loading branch information
helvertti committed Dec 11, 2024
1 parent e19b895 commit 4649633
Showing 1 changed file with 1 addition and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -175,10 +175,7 @@ private static async Task<bool> DeleteSourceFile(AmazonS3Client client, string b

var deleted = await client.DeleteObjectAsync(deleteObjectRequest, cancellationToken);

if (deleted.DeleteMarker == "true")
return true;
else
return false;
return string.IsNullOrEmpty(deleted.DeleteMarker) ? false : bool.Parse(deleted.DeleteMarker);
}
catch (Exception ex)
{
Expand Down

0 comments on commit 4649633

Please sign in to comment.