[rfc] Transport.stat vs lstat

Matt Nordhoff mnordhoff at mattnordhoff.com
Fri Feb 26 18:13:03 GMT 2010


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.
-- 
Matt Nordhoff



More information about the bazaar mailing list