From 2703a1134051f8ee0e45ca244cd2e17082775ba2 Mon Sep 17 00:00:00 2001 From: onefang Date: Wed, 20 Oct 2021 21:25:13 +1000 Subject: More fixing of member backup. --- src/sledjchisl/sledjchisl.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/sledjchisl/sledjchisl.c b/src/sledjchisl/sledjchisl.c index aacb8c6..de11412 100644 --- a/src/sledjchisl/sledjchisl.c +++ b/src/sledjchisl/sledjchisl.c @@ -2446,8 +2446,11 @@ TODO - char *t = ourARs->ARs[i]; int l0 = strlen(t), l1 = strlen(ourARs->this); - V("Renaming %s -> %s-%s.tgz", t, name, &t[l1]); - if (shellMeFail("cd %s; mv %s %s-%s.tgz", scBackup, t, name, &t[l1])) E("Failed to mv %s -> %s-%s.tgz!", t, name, &t[l1]); + if (strcmp(".tgz", &t[l0 - 4]) != 0) + { + V("Renaming %s -> %s-%s.tgz", t, name, &t[l1]); + if (shellMeFail("cd %s; mv %s %s-%s.tgz", scBackup, t, name, &t[l1])) E("Failed to mv %s -> %s-%s.tgz!", t, name, &t[l1]); + } } free(ourARs->ARs); ourARs->ARs = NULL; -- cgit v1.1