aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authoronefang2021-09-09 20:09:20 +1000
committeronefang2021-09-09 20:09:20 +1000
commit7319af857e87ee44a15948988147357e12c20bc2 (patch)
tree68ada105673223e2d942357680cde98bd0ac9bc9
parentRemove debugging added last time. (diff)
downloadopensim-SC-7319af857e87ee44a15948988147357e12c20bc2.zip
opensim-SC-7319af857e87ee44a15948988147357e12c20bc2.tar.gz
opensim-SC-7319af857e87ee44a15948988147357e12c20bc2.tar.bz2
opensim-SC-7319af857e87ee44a15948988147357e12c20bc2.tar.xz
Symlink the shini once more.
Catches the new shini Sandbox.
-rw-r--r--src/sledjchisl/sledjchisl.c19
1 files changed, 18 insertions, 1 deletions
diff --git a/src/sledjchisl/sledjchisl.c b/src/sledjchisl/sledjchisl.c
index d287007..6c1b5bb 100644
--- a/src/sledjchisl/sledjchisl.c
+++ b/src/sledjchisl/sledjchisl.c
@@ -1612,6 +1612,22 @@ void simNotFound(simData *simd, char *sim, char *type, int count, int window, in
1612 free(path); 1612 free(path);
1613} 1613}
1614 1614
1615void simNotFoundAndLink(simData *simd, char *sim, char *type, int count, int window, int panes, int pane)
1616{
1617 char *link = xmprintf("%s/%s.shini", scBin, sim);
1618 char *newPath = xmprintf("%s/%s.shini", scEtc, sim);
1619
1620 simNotFound(simd, sim, type, count, window, panes, pane);
1621 I("Symlinking %s to %s", newPath, link);
1622 if (qfile_exist(link))
1623 {
1624 if (shellMeFail("rm %s", link)) E("rm command failed!");
1625 }
1626 if (0 != symlink(newPath, link))
1627 perror_msg("Symlinking %s to %s", newPath, link);
1628 free(newPath);
1629 free(link);
1630}
1615 1631
1616void freeSimList(simList *sims) 1632void freeSimList(simList *sims)
1617{ 1633{
@@ -1924,10 +1940,11 @@ simList *getSims()
1924 file = xmprintf("%s/sims.lua", scEtc); 1940 file = xmprintf("%s/sims.lua", scEtc);
1925 ourSims = xzalloc(sizeof(simList)); 1941 ourSims = xzalloc(sizeof(simList));
1926 ourSims->byTab = qtreetbl(0); 1942 ourSims->byTab = qtreetbl(0);
1943 ourSims->byUUID = qtreetbl(0);
1927 ourSims->unsorted = qtreetbl(0); 1944 ourSims->unsorted = qtreetbl(0);
1928 ourSims->doIt = FALSE; 1945 ourSims->doIt = FALSE;
1929 ourSims->simsLua = Lua2tree(file, "sims"); 1946 ourSims->simsLua = Lua2tree(file, "sims");
1930 forEachSim(NULL, NULL, simNotFound); 1947 forEachSim(NULL, NULL, simNotFoundAndLink);
1931// dumpLuaTree(ourSims->simsLua, "simsLua", 0); 1948// dumpLuaTree(ourSims->simsLua, "simsLua", 0);
1932// dumpLuaTree(ourSims->byTab, "byTab", 0); 1949// dumpLuaTree(ourSims->byTab, "byTab", 0);
1933// dumpLuaTree(ourSims->unsorted, "unsorted", 0); 1950// dumpLuaTree(ourSims->unsorted, "unsorted", 0);