From fc80a8e11d61a27bb1f1fe3b740d48574d88d45d Mon Sep 17 00:00:00 2001 From: Jan De Dobbeleer Date: Wed, 7 Dec 2022 06:37:36 +0100 Subject: [PATCH] fix(path): ignore empty root in full path resolves #2962 --- src/segments/path.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/segments/path.go b/src/segments/path.go index edf02069..1bab91d5 100644 --- a/src/segments/path.go +++ b/src/segments/path.go @@ -375,7 +375,7 @@ func (pt *Path) getAgnosterShortPath() string { func (pt *Path) getFullPath() string { rel := pt.relative pathSeparator := pt.env.PathSeparator() - if pt.root != pathSeparator && !strings.HasSuffix(pt.root, pathSeparator) { + if len(pt.root) != 0 && pt.root != pathSeparator && !strings.HasSuffix(pt.root, pathSeparator) { rel = pathSeparator + rel } path := pt.replaceFolderSeparators(rel)