From fbb3fb48e43507a6a5d5a4638b7df5661b1804ad Mon Sep 17 00:00:00 2001 From: Tristan Riehs Date: Mon, 29 Dec 2025 16:15:08 +0100 Subject: Use strbuild a few more times --- src/main.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/main.c b/src/main.c index 4a94108..2156e1b 100644 --- a/src/main.c +++ b/src/main.c @@ -263,13 +263,11 @@ static void ftag_export(int argc, char **argv) char *archive_dir = argv[0]; char archive_file[64]; - strcpy(archive_file, archive_dir); - strcat(archive_file, ".tar.gz"); + strbuild(archive_file, "%s%s", archive_dir, ".tar.gz"); /* step 1: create temporary directory having the name of the archive */ char tmp_dir[64]; - strcpy(tmp_dir, "/tmp/"); - strcat(tmp_dir, archive_dir); + strbuild(tmp_dir, "/tmp/%s", archive_dir); int rc = mkdir(tmp_dir, 0755); if (rc == -1) { fprintf(stderr, "mkdir: %s:", tmp_dir); -- cgit v1.2.3