summaryrefslogtreecommitdiff
path: root/src/delete.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/delete.c')
-rw-r--r--src/delete.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/delete.c b/src/delete.c
index aa83796..9bdb3ed 100644
--- a/src/delete.c
+++ b/src/delete.c
@@ -64,7 +64,7 @@ static boolean has_default(char **def, int size)
}
static void reset_default(char *def_val)
{
- char *command;
+ char *command,*def_cmd;
boolean has_default = 1;
if (def_val == NULL) {
return;
@@ -74,7 +74,11 @@ static void reset_default(char *def_val)
command = my_malloc(strlen(m_path.path) + 100, "set");
sprintf(command, "echo %s > %s/node.val", def_val, m_path.path);
system(command);
+ def_cmd = malloc(strlen(m_path.path) + 12);
+ sprintf(def_cmd, "touch %s/def",m_path.path);
+ system(def_cmd);
free(command);
+ free(def_cmd);
}
}
/***************************************************