Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: PATCH: tail-dropping in files module mkdir



On Aug 4, 11:32am, Clint Adams wrote:
} Subject: Re: PATCH: tail-dropping in files module mkdir
}
} > But it's not necessary to do this in mkdir if we're going to change
} > zpathmax() to do it internally.
} 
} How can we do that?  I mean, how will zpathmax know what parts to
} lop off, if any?

It can just keep lopping the tail as long as (errno == ENOENT ||
errno == ENOTDIR), I think.  There are some special cases involving paths
that contain "../" that I'm a bit worried about, but I think most of
those (and paths with lots of consecutive slashes) would fail zsh's
constant-PATH_MAX tests already in boundary cases, so probably nothing
will become broken that wasn't already.

-- 
Bart Schaefer                                 Brass Lantern Enterprises
http://www.well.com/user/barts              http://www.brasslantern.com

Zsh: http://www.zsh.org | PHPerl Project: http://phperl.sourceforge.net   



Messages sorted by: Reverse Date, Date, Thread, Author