Skip to content

Commit d222cfe

Browse files
[Build.Tasks] Use LogDebugMessage instead of LogWarning in ExtractAll() (#329)
The path-traversal skip message in Files.ExtractAll() used LogWarning, but this is a diagnostic/informational message that should use LogDebugMessage (MessageImportance.Low) instead. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent 9b8ef3c commit d222cfe

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

  • src/Microsoft.Android.Build.BaseTasks

src/Microsoft.Android.Build.BaseTasks/Files.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -472,7 +472,7 @@ public static bool ExtractAll (ZipArchive zip, string destination, Action<int, i
472472
var fullName = modifyCallback?.Invoke (entry.FullName) ?? entry.FullName;
473473
var outfile = Path.GetFullPath (Path.Combine (destination, fullName));
474474
if (!outfile.StartsWith (fullDestination, StringComparison.OrdinalIgnoreCase)) {
475-
log?.LogWarning ($"Skipping zip entry \"{entry.FullName}\" (resolved as \"{fullName}\") because it would extract outside the destination directory: \"{outfile}\".");
475+
log?.LogDebugMessage ($"Skipping zip entry \"{entry.FullName}\" (resolved as \"{fullName}\") because it would extract outside the destination directory: \"{outfile}\".");
476476
continue;
477477
}
478478
files.Add (outfile);

0 commit comments

Comments
 (0)