mm(1): fixes bug with -a; mm.1, tests/mm.mk: changes to test regression in -a and -t

This commit is contained in:
2025-11-02 01:12:27 -06:00
parent 544b544d84
commit feac3bf4f8
3 changed files with 27 additions and 4 deletions
+1 -1
View File
@@ -168,7 +168,7 @@ fn main() -> ExitCode {
let options = File::options()
/* dont truncate if -t is specified, append if -a is specified */
.truncate(t)
.truncate(!a && t)
.append(a)
/* enable the ability to create and write to files */
.create(true)