[PATCH] Fix util._statfiles_clustered() failing at root of awindows drive
Patrick Mézard
pmezard at gmail.com
Sat Nov 1 14:41:04 UTC 2008
Andrei Vermel a écrit :
>> I cannot reproduce with or without osutil.pyd. Is it 2.4.3 vs
>> 2.4.4 ? ActiveState vs non-ActiveState ? Looks unlikely. I'd
>> really like to understand what's going wrong instead of
>> patching blindly. I suppose the failure comes from
>> osutil.listdir() when called with drive paths ? Does it fail
>> with the C extension or without or in both cases ?
>>
>
> dir, base = nf[:pos], nf[pos+1:]
> with nf="m:\qqq.txt" gives dir="m:"
>
> When cwd = "m:\", this works fine, because "m:" means cwd.
> When cwd is a subfolder, things go wrong.
> Adding os.sep to "m:" fixes this.
Yes, your previous message made things much clearer. I am currently stuck on "_statfiles_clustered('\\a')" which is valid but fails with your patch for dir[-1] is undefined. I think the right fix is to replace empty dir by current driver letter + ':\', I am looking for an efficient way to do that.
--
Patrick Mézard
More information about the Mercurial-devel
mailing list