diff options
-rw-r--r-- | src/sledjchisl/sledjchisl.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/sledjchisl/sledjchisl.c b/src/sledjchisl/sledjchisl.c index 73a29f3..c67187b 100644 --- a/src/sledjchisl/sledjchisl.c +++ b/src/sledjchisl/sledjchisl.c | |||
@@ -2408,12 +2408,18 @@ TODO - | |||
2408 | { | 2408 | { |
2409 | I("Unpacking %s", gtr); | 2409 | I("Unpacking %s", gtr); |
2410 | if (shellMeFail("cd %s; ionice -c3 nice -n 19 tar -xf %s >>%s", dir, gtr, gerr)) E("Failed to unpack %s!", gtr); | 2410 | if (shellMeFail("cd %s; ionice -c3 nice -n 19 tar -xf %s >>%s", dir, gtr, gerr)) E("Failed to unpack %s!", gtr); |
2411 | char *t = xmprintf("%s/%s_git%cAR", dir, name, TYPE); | 2411 | char *t = xmprintf("%s/%s_git%cAR", dir, name, TYPE), *t0 = xmprintf("%s/%s", dir, gar); |
2412 | // Changed from _ to -, but deal with old archives. | 2412 | // Changed from _ to -, but deal with old archives. |
2413 | if (qfile_exist(t)) | 2413 | if (qfile_exist(t)) |
2414 | { | 2414 | { |
2415 | if (shellMeFail("mv %s %s/%s", t, dir, gar)) E("Failed to move %s!", t); | 2415 | if (shellMeFail("mv %s %s", t, t0)) E("Failed to move %s!", t); |
2416 | } | 2416 | } |
2417 | if (!qfile_exist(t0)) | ||
2418 | { | ||
2419 | C("%s doesn't exist!", t0); | ||
2420 | return; | ||
2421 | } | ||
2422 | free(t0); | ||
2417 | free(t); | 2423 | free(t); |
2418 | } | 2424 | } |
2419 | else | 2425 | else |