tilde-bug in vfs.c
Oskar Liljeblad
oskar at osk.mine.nu
Thu Sep 5 20:52:19 UTC 2002
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.
Regards,
Oskar Liljeblad (oskar at osk.mine.nu)
More information about the mc-devel
mailing list