Re: tilde-bug in vfs.c

On Thursday, September 05, 2002 at 16:16, Pavel Roskin wrote:
> 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.


Oskar Liljeblad (oskar osk mine nu)

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]