diff options
author | Joseph Hunkeler <jhunkeler@users.noreply.github.com> | 2020-04-19 00:35:25 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-04-19 00:35:25 -0400 |
commit | 57c9489b28a481abc078ad3a2dd197079f9c414b (patch) | |
tree | 12cc1ea0186b242a82d87bc2f62142e5decefedb /lib/config_global.c | |
parent | 59f7d29e2d707373ba1153337dca3279a2e3acc5 (diff) | |
parent | 8cdddbb0f1a8c6eb023cbe732e5701240a54ff3c (diff) | |
download | spmc-57c9489b28a481abc078ad3a2dd197079f9c414b.tar.gz |
Merge pull request #25 from jhunkeler/error-handler-etc
Error handler etc
Diffstat (limited to 'lib/config_global.c')
-rw-r--r-- | lib/config_global.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/config_global.c b/lib/config_global.c index f63566b..e97cddb 100644 --- a/lib/config_global.c +++ b/lib/config_global.c @@ -153,7 +153,7 @@ void check_runtime_environment(void) { } /** - * + * Define the structure of a SPM root hierarchy * @param basepath * @return */ @@ -170,12 +170,13 @@ SPM_Hierarchy *spm_hierarchy_init(char *basepath) { fs->tmpdir = join((char *[]) {fs->rootdir, "tmp", NULL}, DIRSEPS); fs->dbdir = join((char *[]) {fs->localstatedir, "db", NULL}, DIRSEPS); fs->dbrecdir = join((char *[]) {fs->dbdir, "records", NULL}, DIRSEPS); + fs->rootrec = join((char *[]) {".spm_root", NULL}, DIRSEPS); return fs; } /** - * + * Free SPM_Hierarchy structure * @param fs */ void spm_hierarchy_free(SPM_Hierarchy *fs) { @@ -190,6 +191,7 @@ void spm_hierarchy_free(SPM_Hierarchy *fs) { free(fs->tmpdir); free(fs->dbdir); free(fs->dbrecdir); + free(fs->rootrec); free(fs); } |