aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authoronefang2022-03-18 21:14:09 +1000
committeronefang2022-03-18 21:14:09 +1000
commit00db53916b3570521aeb93e39a63e400957a643c (patch)
tree0bb607e355bb8fe1b46fc3e05b7d2a278c7a7c22
parentSafer directory deletes. (diff)
downloadopensim-SC-00db53916b3570521aeb93e39a63e400957a643c.zip
opensim-SC-00db53916b3570521aeb93e39a63e400957a643c.tar.gz
opensim-SC-00db53916b3570521aeb93e39a63e400957a643c.tar.bz2
opensim-SC-00db53916b3570521aeb93e39a63e400957a643c.tar.xz
Abort gitar if we don't find the proper name inside.
-rw-r--r--src/sledjchisl/sledjchisl.c10
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