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

Re: PATCH: Re: completion problem with filename including # (and pathmax stuff)



On Aug 4,  9:01am, Sven Wischnowsky wrote:
} Subject: Re: PATCH: Re: completion problem with filename including # (and 
}
} > > There is another problem with the pathmax stuff: with the files
} > > module, doing `mkdir foo' fails because it tries to get the pathname
} > > length of a non-existing directory.
} > 
} > I think that statting to find the mount point would be too wasteful.
} > Dropping the tail could work except for things like mkdir -p.
} 
} But we need some kind of solution. I'm getting this with a normal
} True64 Unix installation (so it has nothing to do with any glibc
} whatsoever).

There are a couple of things we could do.

One, we could pitch out the path length test and simply let domkdir()
fail -- and perhaps test the value of errno to decide whether to break
or continue as a result.

Two, we could cause zpathmax() to lop off the tail of the path and call
itself until it actually does find a maximum path length, then add the
tail back on and repeat the strlen() test.  That might be a good thing
to have for the general case anyway.

Or we could do both of the above.

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