[rfc] Transport.stat vs lstat
John Arbash Meinel
john at arbash-meinel.com
Fri Feb 26 18:24:15 GMT 2010
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Matt Nordhoff wrote:
> Martin Pool wrote:
>> The issue arises in
>> https://code.edge.launchpad.net/~rls/bzr/transport-link-and-symlink-support/+merge/20096
>> of whether Transport.stat should do lstat underneath, or whether there
>> should be a separate Transport.lstat. Previously Transports didn't
>> care about symlinks much.
>>
>> istm that while consistency with unix is good, making stat always
>> explicitly deal with symlinks may actually be likely to avoid some
>> misbehaviour there, and it might also be more consistent across
>> differerent transports that may not automatically follow symlinks.
>
> FWIW, Loggerhead does one Transport.stat, to check if Branch.open failed
> because it was passed something other than a directory. ISTM this is
> better off being stat than lstat, but it's a rare case anyway.
Loggerhead could then see it was a symlink and do something about it,
though. You can't the other way around.
John
=:->
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
iEYEARECAAYFAkuIEc8ACgkQJdeBCYSNAAMiEgCcDC2/NZKkDrCP+08/8NWRYf5J
i7gAn29i23d8tqgS5bgXPCwHHFMTAgVv
=W5DH
-----END PGP SIGNATURE-----
More information about the bazaar
mailing list