Scripts: a renamed file's old path is named in the report's written

rename named only the new path in written, so a run that renamed a file an earlier run wrote did not name the path it emptied. It now names both, as remove names the path it deletes.
This commit is contained in:
dotCooCoo
2026-11-13 15:06:11 -08:00
parent 0300f70950
commit fb12ddb759
2 changed files with 25 additions and 0 deletions
+2
View File
@@ -1763,6 +1763,8 @@ fn rename(host: &Host, a: &[Data]) -> Result<Data, HostError> {
file.target = Some(if rest.as_os_str().is_empty() { to.clone() } else { to.join(rest) });
}
}
// The old path no longer holds the file, so the report names it as well as the new one.
disk.wrote(&from);
disk.wrote(&to);
Ok(Data::Object(vec![("fs".into(), Data::String(new))]))
}