Autor: Daniel Tiefnig Data: A: exim-dev Assumpte: Re: [exim-dev] Preliminary testing of a new Exim test suite
Philip Hazel wrote: > Wait, wait, wait! I'm right after all, I think.
Well, kind of. :o)
> The problem is the H part of the name. The number that follows H is
> the microseconds of the time. However, it doesn't come with leading
> zeros,
Damit, I noticed the sometimes different lengths of the filenames today,
but weren't smart enough to see the coherence.
> which is why you get
>
>> 1133279114.H846792P17297.myhost.test.ex:S370
>> 1133279114.H94773P17285.myhost.test.ex
>
> The second one should be sorted first because 94773 is less than
> 846792.
*Sigh*. I don't know how often I allready made this mistake, comparing
numbers as strings.
> I can fix this by using a correct sorting algorithm. Please try the
> patch below.
Now it works out correctly. There are at least two other places where
this would be usefull. (searching for "sort readdir")