[PATCH 1 of 2 STABLE] opener: raise IOError on paths ending in '/'
Benoit Boissinot
bboissin at gmail.com
Sun Oct 31 05:33:11 CDT 2010
On Sun, Oct 31, 2010 at 8:32 AM, Adrian Buehlmann <adrian at cadifra.com> wrote:
> # HG changeset patch
> # User Adrian Buehlmann <adrian at cadifra.com>
> # Date 1288433569 -7200
> # Branch stable
> # Node ID cd9700552b22bf12b375fc48a582fd96da721145
> # Parent 15ca4bfecfe343cbf53210b19c081676b2a35d3f
> opener: raise IOError on paths ending in '/'
>
> It's also better not to call nlinks() for such malformed paths, so
> let's move the path test out of the OSError exception handler.
>
I'm not sure that's the fix I prefer, why not just:
if not basename:
raise
In the exception handler to re-raise it? (that way it would raise
ENOENT when approriate, and EISDIR otherwise.
> As another nice side effect, this patch also fixes a platform dependent
> test output variation that happens to have been introduced with 551aa6e27929
> (551aa6e27929 causes test-mq-qnew.t to fail on Mac OS X, as reported
> by Steve Borho).
Do you have a link to the bug report?
Thanks,
Benoit
More information about the Mercurial-devel
mailing list