ANNOUNCE: GNU Midnight Commander 4.5.55
Timur I. Bakeyev
mc at listserv.bat.ru
Sat Aug 25 18:55:51 UTC 2001
Hi, Pavel!
It seems, I was wrong with the description, or, you tried it in a different way.
Basically, the conditions, that can expose the bug are - you have no read access
to one of the dirs in the path in symlink. Then you'll be thrown to '/'.
Ok, the cause of this problem is in one of your recent changes:
2001-07-17 Pavel Roskin <proski at gnu.org>
* util.c (get_current_wd): Remove. It's obsoleted by
g_get_current_dir() from glib.
Unfortunatelly, g_get_current_dir() has a strange 'feature', that makes it im-
possible to use it in MC - in case of inability to read the path instead of
returning NULL it returns '/'(actually, G_DIR_SEPARATOR).
So, there is no clear way to distinct error and a leagal case when your current
dir is root, or when it is a symlink to root.
I guess, the cheapest solution is to revert this change, unless we can change
the behaviour of the glib function.
With best regards,
Timur.
On Fri, Aug 24, 2001 at 11:37:25PM -0400, Pavel Roskin wrote:
> Hi, Timur!
>
> > then tapping on a directory c/ in MC throws you to the root directory '/'.
>
> I could not reproduce this problem on Linux 2.4.8-ac7 with /tmp mounted as
> tmpfs, logged in as ordinary user.
>
> In your case it is probably *BSD. I have no time to guess. Please either
> give more details right away or send the patch.
>
> > With old MC I'm getting desired behaviour.
>
> I don't know how old your "old" MC is, but I cannot think of any changes
> that could have changed this behavior.
>
> But just in case, try the same without the subshell support (mc -u).
>
> --
> Regards,
> Pavel Roskin
More information about the mc-devel
mailing list