Re: tilde-bug in vfs.c
- From: Pavel Machek <pavel suse cz>
- To: Oskar Liljeblad <oskar osk mine nu>
- Cc: Pavel Roskin <proski gnu org>, mc-devel gnome org
- Subject: Re: tilde-bug in vfs.c
- Date: Sat, 7 Sep 2002 05:50:56 +0000
> > What does your patch implement? How does it work? Please always comment
> > non-obvious patches. In this case we really should make a decision before
> > we go ahead and patch the code.
> Oh, I thought it was so simple. :) Anyway, vfs_canon is modified to
> first canonicalize without tilde expansion. If this expanded file
> exists (according to the vfs's stat function), this name is returned.
> Otherwise, vfs_canon will simply canonicalize *with* tilde expansion
> and return the result.
> To accomplish this it was necessary to create a new function
> vfs_canon_internal that can canonicalize either with tilde expansion
> or without.
> The drawback is that vfs_canon in worst case takes twice as long,
> plus the time for the vfs stat call.
VFS stat can take *long*. I'd suggest against this. What about
vfs_tilde_expand(char *name, int maxlen)?
Philips Velo 1: 1"x4"x8", 300gram, 60, 12MB, 40bogomips, linux, mutt,
details at http://atrey.karlin.mff.cuni.cz/~pavel/velo/index.html.
] [Thread Prev