Message ID | 20230710123914.5a58be62@gandalf.local.home (mailing list archive) |
---|---|
State | Accepted |
Commit | 354dccca52e805ce1b22e2b62cbae8c265886c27 |
Headers | show |
Series | trace-cmd split: Do not append '.1' to single file if output specified | expand |
diff --git a/tracecmd/trace-split.c b/tracecmd/trace-split.c index 1daa847d9775..59df1d02b345 100644 --- a/tracecmd/trace-split.c +++ b/tracecmd/trace-split.c @@ -545,7 +545,7 @@ void trace_split (int argc, char **argv) if (!output) output = strdup(input_file); - if (!repeat) { + if (!repeat && strcmp(output, input_file) == 0) { output = realloc(output, strlen(output) + 3); strcat(output, ".1"); }