Revert "Respect symlinks when tagging files (#1997)" (#2055)

This reverts commit fe3a97c5d0.
This commit is contained in:
Joe Lim authored and GitHub committed 2025-07-20 19:21:13 +10:00
1 parent c7b59d27ce
commit 041dfcc073
3 files changed
+2 -12

No files matched your search

-8
View File
@@ -32,14 +32,6 @@ func replaceTilde(s string) string {
return s
}
func evalSymlinks(path string) string {
if target, err := filepath.EvalSymlinks(path); err == nil {
return target
}
return path
}
func runeSliceWidth(rs []rune) int {
w := 0
for _, r := range rs {
+1 -3
View File
@@ -1257,8 +1257,6 @@ func (nav *nav) toggle() {
}
func (nav *nav) tagToggleSelection(path string, tag string) {
path = evalSymlinks(path)
if _, ok := nav.tags[path]; ok {
delete(nav.tags, path)
} else {
@@ -1294,7 +1292,7 @@ func (nav *nav) tag(tag string) error {
}
for _, path := range list {
nav.tags[evalSymlinks(path)] = tag
nav.tags[path] = tag
}
return nil
+1 -1
View File
@@ -475,7 +475,7 @@ func (win *win) printDir(ui *ui, dir *dir, context *dirContext, dirStyle *dirSty
}
tag := " "
if val, ok := context.tags[evalSymlinks(path)]; ok && len(val) > 0 {
if val, ok := context.tags[path]; ok && len(val) > 0 {
tag = val
}