Tilde expansion fix
Adam Byrtek / alpha
alpha at student.uci.agh.edu.pl
Tue Feb 18 20:32:24 UTC 2003
Original Debian bug report:
---cut---
Package: mc
Version: 4.5.42-11.potato.4
Severity: normal
MC believes that regular files with leading tilde and user names
are directories. "~root" is one such file. Create one
(touch "~root") and run mc to demonstrate the bug.
Oskar Liljeblad (osk at hem.passagen.se)
---cut--
I've spend a few hours examining mc code and tracing more and more
levels of recursion. I've decided to apply a very clean fix which:
- makes mc treat '~name' paths as regular files ('~' is an exception)
- makes mc treat '~name/...' paths as user directories (with PATH_SEP
inside)
It makes 'cd' behaviour change a little, but a simple fix in one place
is IMO better than multiple fixes in different pieces of code
(separately for cd, viewer, panel, etc.) And we can't have regular
files shown as directories...
Patch in BTS:
https://savannah.gnu.org/patch/index.php?func=detailpatch&patch_id=1129&group_id=3521
Regards
--
_.|._ |_ _. : Adam Byrtek, alpha@(irc.pl|debian.org)
(_|||_)| |(_| : gg 1802819, pgp 0xB25952C0
| : jid alpha.pl(at)jabber.org
More information about the mc-devel
mailing list