snapshot: return error when snapshot exists

(cherry picked from commit 7cabba0774)
This commit is contained in:
Zbigniew Jędrzejewski-Szmek
2014-11-02 16:40:27 -05:00
parent c3a8638cf4
commit 3db5ad126f
+1 -1
View File
@@ -208,7 +208,7 @@ int snapshot_create(Manager *m, const char *name, bool cleanup, sd_bus_error *e,
return sd_bus_error_setf(e, SD_BUS_ERROR_INVALID_ARGS, "Unit name %s lacks snapshot suffix.", name);
if (manager_get_unit(m, name))
sd_bus_error_setf(e, BUS_ERROR_UNIT_EXISTS, "Snapshot %s exists already.", name);
return sd_bus_error_setf(e, BUS_ERROR_UNIT_EXISTS, "Snapshot %s exists already.", name);
} else {