summaryrefslogtreecommitdiffstats
path: root/sm.c
diff options
context:
space:
mode:
Diffstat (limited to 'sm.c')
-rw-r--r--sm.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/sm.c b/sm.c
index 59e286e..d45ac85 100644
--- a/sm.c
+++ b/sm.c
@@ -339,6 +339,7 @@ edit(const char *filename)
return 0;
}
snprintf(path, sizeof(path), "%s/%s", kcontentdir, filename);
+ mkparentdirs(path);
switch ((pid = fork())) {
case -1:
fprintf(stderr, "fork: %s\n", strerror(errno));
@@ -362,6 +363,7 @@ list(const char *filename)
plugstats[0] = '[';
plugstats[NPLUGINS+1] = ']';
+ plugstats[NPLUGINS+2] = '\0';
if (filename) {
snprintf(path, sizeof(path), "%s/%s", kcontentdir, filename);
cat(path, stdout);