Tilde expansion fix



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 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



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]