summaryrefslogtreecommitdiff
path: root/src/core/load-fragment.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/load-fragment.c')
-rw-r--r--src/core/load-fragment.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/core/load-fragment.c b/src/core/load-fragment.c
index d43d1b416..99cf20dcc 100644
--- a/src/core/load-fragment.c
+++ b/src/core/load-fragment.c
@@ -2431,7 +2431,7 @@ static int open_follow(char **filename, FILE **_f, Set *names, char **_final) {
/* Add the file name we are currently looking at to
* the names of this unit, but only if it is a valid
* unit name. */
- name = path_get_file_name(*filename);
+ name = basename(*filename);
if (unit_name_is_valid(name, true)) {