aboutsummaryrefslogtreecommitdiff
path: root/src/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/main.c')
-rw-r--r--src/main.c6
1 files changed, 2 insertions, 4 deletions
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);