--- ./src/core/manager.c.orig 2017-06-29 12:28:00.432581542 +0200 +++ ./src/core/manager.c 2017-06-29 12:28:23.252883607 +0200 @@ -1498,7 +1498,7 @@ if (path && !is_path(path)) return sd_bus_error_setf(e, SD_BUS_ERROR_INVALID_ARGS, "Path %s is not absolute.", path); - if (!name) + if (!name && path) name = basename(path); t = unit_name_to_type(name); --- ./src/shared/install.c.orig 2017-06-29 12:23:12.957500184 +0200 +++ ./src/shared/install.c 2017-06-29 12:26:54.759752695 +0200 @@ -1003,7 +1003,7 @@ assert(c); assert(name || path); - if (!name) + if (!name && path) name = basename(path); if (!unit_name_is_valid(name, UNIT_NAME_ANY))