From 197abb781e7e38e59d3b683494b57bc80081da16 Mon Sep 17 00:00:00 2001 From: onefang Date: Wed, 20 Oct 2021 15:39:26 +1000 Subject: Fix ungitIAR maybe? --- src/sledjchisl/sledjchisl.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/sledjchisl/sledjchisl.c b/src/sledjchisl/sledjchisl.c index 885bfad..37fa588 100644 --- a/src/sledjchisl/sledjchisl.c +++ b/src/sledjchisl/sledjchisl.c @@ -2553,7 +2553,7 @@ void ungitar(simData *simd, char *sim, int count, int window, int panes, int pan Results in slightly larger I/OARs, as we store the directory names separately. Can't see any options to not do that. Also, we name them .oar.tgz, to NOT hide the fact they are simple tarballs, while still tagging them as I/OARs. */ - char *name = xstrdup(sim); + char *name = xstrdup(sim), *tab = xstrdup(simd->tab); if (FLAG(m)) { @@ -2561,9 +2561,12 @@ void ungitar(simData *simd, char *sim, int count, int window, int panes, int pan { free(name); name = xmprintf("%s_%s", sim, last); + free(tab); + name = xmprintf("%s %s", sim, last); } else { + free(tab); free(name); return; } @@ -2634,12 +2637,12 @@ void ungitar(simData *simd, char *sim, int count, int window, int panes, int pan break; } free(prev); - prev = xmprintf("%s/%s-%s.tgz", scBackup, simd->tab, &out[l - 24]); // Converting any old full names to new names. + prev = xmprintf("%s/%s-%s.tgz", scBackup, tab, &out[l - 24]); // Converting any old full names to new names. if (!qfile_exist(prev)) { I("Extracting %s", prev); free(prev); - prev = xmprintf("%s/%s-%s", scBackup, simd->tab, &out[l - 24]); // Converting any old full names to new names. + prev = xmprintf("%s/%s-%s", scBackup, tab, &out[l - 24]); // Converting any old full names to new names. // OpenSim insists on the archive.xml file being the very first in the tarball. if (shellMeFail("cd %s/%s; ionice -c3 nice -n 19 tar -c archive.xml -f %s", dir, gar, prev)) E("Failed to tar %s!", prev); if (shellMeFail("cd %s/%s; ionice -c3 nice -n 19 tar -r -f %s --exclude='.git*' --exclude='archive.xml' * ", @@ -2667,6 +2670,7 @@ ungitARend: free(gar); } free(dir); + free(tab); free(name); } -- cgit v1.1