summaryrefslogtreecommitdiff
path: root/internal/engine/facts.go
diff options
context:
space:
mode:
Diffstat (limited to 'internal/engine/facts.go')
-rw-r--r--internal/engine/facts.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/internal/engine/facts.go b/internal/engine/facts.go
index 423bfd9..5790e95 100644
--- a/internal/engine/facts.go
+++ b/internal/engine/facts.go
@@ -185,11 +185,11 @@ func (f *facts) Duplicate(dirs []string) (string, bool, error) {
}
// displayOriginal reports orig relative to root when it lies inside root,
-// else as an absolute path.
+// else home-abbreviated (xdg.Abbrev), as every other user-visible path is.
func displayOriginal(orig, root string) string {
rel, err := filepath.Rel(root, orig)
if err != nil || rel == ".." || strings.HasPrefix(rel, ".."+string(filepath.Separator)) {
- return orig
+ return xdg.Abbrev(orig)
}
return filepath.ToSlash(rel)
}