diff options
-rw-r--r-- | src/sledjchisl/sledjchisl.c | 7 |
1 files 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 - | |||
2446 | char *t = ourARs->ARs[i]; | 2446 | char *t = ourARs->ARs[i]; |
2447 | int l0 = strlen(t), l1 = strlen(ourARs->this); | 2447 | int l0 = strlen(t), l1 = strlen(ourARs->this); |
2448 | 2448 | ||
2449 | V("Renaming %s -> %s-%s.tgz", t, name, &t[l1]); | 2449 | if (strcmp(".tgz", &t[l0 - 4]) != 0) |
2450 | 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]); | 2450 | { |
2451 | V("Renaming %s -> %s-%s.tgz", t, name, &t[l1]); | ||
2452 | 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]); | ||
2453 | } | ||
2451 | } | 2454 | } |
2452 | free(ourARs->ARs); | 2455 | free(ourARs->ARs); |
2453 | ourARs->ARs = NULL; | 2456 | ourARs->ARs = NULL; |