From 526e3cbbdd530f4081b638fbb6e1e1c641ea57d9 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= Date: Fri, 18 Sep 2020 14:48:40 +0200 Subject: [PATCH] core: don't try to load units from non-absolute paths The error message disagreed with the check that was actually performed. Adjust the check. --- src/core/manager.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/core/manager.c b/src/core/manager.c index b3f6df8661f..d85d938e7ba 100644 --- a/src/core/manager.c +++ b/src/core/manager.c @@ -1973,10 +1973,9 @@ int manager_load_unit_prepare( assert(m); assert(_ret); - /* This will prepare the unit for loading, but not actually - * load anything from disk. */ + /* This will prepare the unit for loading, but not actually load anything from disk. */ - if (path && !is_path(path)) + if (path && !path_is_absolute(path)) return sd_bus_error_setf(e, SD_BUS_ERROR_INVALID_ARGS, "Path %s is not absolute.", path); if (!name) { -- 2.47.3