Skip to content

Commit

Permalink
Fixing warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
MatthieuMEZIL committed Apr 15, 2023
1 parent 37af27b commit d6ce057
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/Artifacts/Tasks/Robocopy.cs
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ private void CopyItems(IList<RobocopyMetadata> items, DirectoryInfo source)
foreach (string destination in item.DestinationFolders)
{
FileInfo destFile = new FileInfo(Path.Combine(destination, item.RenamedFile ?? file));
if (Verify(destFile, shouldExist:false, verifyExists:false))
if (Verify(destFile, shouldExist: false, verifyExists: false))
{
CopyFile(sourceFile, destFile, createDirs, item);
}
Expand Down Expand Up @@ -193,14 +193,14 @@ private IEnumerable<IList<RobocopyMetadata>> GetBuckets()

int sourceLength = Sources?.Length ?? 0;
List<string> renamedFiles;
if (sourceLength != 0)
if (sourceLength != 0)
{
renamedFiles = Sources[0].GetMetadata("RenamedFiles").Split(RobocopyMetadata.DestinationSplitter, StringSplitOptions.RemoveEmptyEntries).Select(d => d.Trim()).ToList();
if (renamedFiles.Count == 0)
{
renamedFiles = null;
}
else if (renamedFiles.Count != sourceLength)
else if (renamedFiles.Count != sourceLength)
{
Log.LogError($"Artifact Include '{string.Join(";", Sources.Select(s => s.ItemSpec))}' length does not match with RenamedFiles '{string.Join(";", renamedFiles)}'");
return allBuckets;
Expand Down

0 comments on commit d6ce057

Please sign in to comment.