<<< Date Index >>>     <<< Thread Index >>>

Re: Parent directory and "../"



Hello,

On Tue, Sep 05, 2006 at 12:48:44PM +0200, Stefano Sabatini wrote:
> The first time I use <change-dir>../<enter> mutt interprets
> ".." as the start directory, then things get more complicated, and
> after browsing randomly using my macro some times it happens the
> "Directory" value in the status line may easily appear for example
> as: 
> "=../Mail/archive/old/../../archive/old/../../archive"
>  ...being the mutt interpretation of "../" beyond my understanding.
> 
> It's definitively a mutt bug and I've already reported it.

I think this is correct.  Only mutt is missing a function for going
directly to parent directory.  So the macro always append ../ to path
and the path is not striped.

If your "folder" (set ?folder) is set to ~/Mail then interpretion should
be as the following (i have added spaces for better overview):
         =../Mail/archive/old/../../archive/old/../../archive
-> ~/Mail/../Mail/archive/old/../../archive/old/../../archive
-> ~/        Mail/archive/old/../../archive/old/../../archive
-> ~/        Mail/archive/       ../archive/old/../../archive
-> ~/        Mail/                  archive/old/../../archive
-> ~/        Mail/                  archive/       ../archive
-> ~/        Mail/                                    archive

=> ~/Mail/archive

A ../ removes the previous directory.  So the directory display in the
browser should be ugly but browsing should work.

Grettings
Sebastian Waschik