Path.Combine is given a later argument that starts with a slash or drive, which discards everything before it
What it finds
Path.Combine(root, "/logs") returns "/logs": an argument that is rooted replaces the path built so far. A leading separator in a literal part is almost always a mistake; Path.Join concatenates without this rule, or the separator can be dropped.
From the rule's source, rooted_path_combined.rs.
using System.IO; class Logs{ string Dir(string root) => Path.Combine(root, "/logs");tx0 reports: this rooted part makes Path.Combine drop the parts before it string Fine(string root) => Path.Combine(root, "logs");} Turn it on, off or suppress it
The rule runs in every tier. To turn it off for a project, set its level in tx0.toml:
[rules]
"tx0/csharp:rooted-path-combined" = "off"To keep one finding, suppress it with a reason. tx0 suppress ID --reason "..." writes the comment on the line before the code:
// tx0: ignore[tx0/csharp:rooted-path-combined] reason="..."tx0 explain tx0/csharp:rooted-path-combined shows the same in the terminal. Found a false positive? Report it.