summaryrefslogtreecommitdiff
path: root/src/nspawn/nspawn.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/nspawn/nspawn.c')
-rw-r--r--src/nspawn/nspawn.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/nspawn/nspawn.c b/src/nspawn/nspawn.c
index eef0e9a281..583912f57c 100644
--- a/src/nspawn/nspawn.c
+++ b/src/nspawn/nspawn.c
@@ -1096,7 +1096,7 @@ int main(int argc, char *argv[]) {
path_kill_slashes(arg_directory);
if (!arg_machine) {
- arg_machine = strdup(path_get_file_name(arg_directory));
+ arg_machine = strdup(basename(arg_directory));
if (!arg_machine) {
log_oom();
goto finish;