Date: Thu, 04 Jun 2026 21:15:38 +0000
From: Baptiste Daroussin <bapt@FreeBSD.org>
To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
Subject: git: b813e46e1533 - main - nuageinit: fix dirname('/') returning nil instead of '/'
Message-ID: <6a21eafa.3dc0c.2dd97158@gitrepo.freebsd.org>
index | next in thread | raw e-mail
The branch main has been updated by bapt: URL: https://cgit.FreeBSD.org/src/commit/?id=b813e46e153327b66db4791ec0003b7e7cc51214 commit b813e46e153327b66db4791ec0003b7e7cc51214 Author: Baptiste Daroussin <bapt@FreeBSD.org> AuthorDate: 2026-06-04 16:44:31 +0000 Commit: Baptiste Daroussin <bapt@FreeBSD.org> CommitDate: 2026-06-04 16:44:31 +0000 nuageinit: fix dirname('/') returning nil instead of '/' --- libexec/nuageinit/nuage.lua | 3 +++ 1 file changed, 3 insertions(+) diff --git a/libexec/nuageinit/nuage.lua b/libexec/nuageinit/nuage.lua index f3c23a7c3eb8..839cf3588021 100644 --- a/libexec/nuageinit/nuage.lua +++ b/libexec/nuageinit/nuage.lua @@ -93,6 +93,9 @@ local function dirname(oldpath) end local path = oldpath:gsub("[^/]+/*$", "") if path == "" then + if oldpath:sub(1, 1) == "/" then + return "/" + end return nil end return pathhome | help
Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?6a21eafa.3dc0c.2dd97158>
