Commit 48cdeb20 authored by Christian Kellner's avatar Christian Kellner
Browse files

guard: add pre-condition check in guard_save

Ensure that we are not saved already in 'bolt_guard_save'.
parent c4e35871
......@@ -546,6 +546,8 @@ bolt_guard_save (BoltGuard *guard,
g_autofree char *name = NULL;
gboolean ok;
g_return_val_if_fail (guard->path == NULL, FALSE);
name = g_strdup_printf ("%s.guard", guard->id);
guardfile = g_file_get_child (guarddir, name);
path = g_file_get_path (guardfile);
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment