patch: remove .. from /

Pavel Roskin proski at gnu.org
Sun Jan 19 12:42:52 UTC 2003


Hello!

> I have about 200 messages in my mailbox, and I'll be back on January 18.

Now it's more like 400.

> > -	if (!dotdot_found)
> > +        if (!dotdot_found && strcmp (vfs_canon ("."), "/")) /* do not add ..
>
> This looks reasonable.

Except that if the dotdot_found was what it seems to be, ".." would not be
added to the root directory only if ".." didn't already appear in the
listing for "/". Fortunately, the dotdot_found variable is now useless,
since handle_dirent() doesn't process "..", so your patch works.

I've applied a similar patch but removed dotdot_found to avoid confusion.

-- 
Regards,
Pavel Roskin



More information about the mc mailing list