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)