Directory bug on Windows

Brian Rice water at tunes.org
Fri May 20 13:01:45 PDT 2005


Oops, I spoke too soon! This is actually due to a bug in underlying  
Sequence calls that was fixed recently after the 0.3.3 release. If  
you use the alpha images + sources, or paste the following into Slate  
to evaluate it (and save your image so you don't have to do it  
again), what you are doing should work:

c@(Sequence traits) indexOfSubSeq: subSeq startingAt: start ifAbsent:  
block
[| first index |
   subSeq isEmpty ifTrue: [^ block do].
   subSeq size = 1 ifTrue: [^ (c indexOf: subSeq first startingAt:  
start ifAbsent: block)].
   first: subSeq first.
   start upTo: c size - subSeq size do: [| :startIndex |
     (c at: startIndex) = first ifTrue:
       [index: 1.
        [(c at: startIndex + index) = (subSeq at: index)]
       whileTrue: [index: index + 1.
               index = subSeq size ifTrue: [^ startIndex]]]].
   block do
].

On May 20, 2005, at 12:59 PM, Brian Rice wrote:

> On May 20, 2005, at 12:02 PM, Bryn Keller wrote:
>> Hi folks,
>>
>> Is this the best place to report bugs? I found one that occurs  
>> when you try to use a windows-style directory path, with either  
>> forward or backward slashes.
>>
>
> First answer: yes.
>
> Second answer: it looks like a bug in the part that tries to figure  
> out the drive. Honestly I haven't turned on my Windows XP machine  
> in a few months (the damned systems software broke down again - I  
> get so tired of dealing with that), so this has probably bit-rotten  
> or never worked. If you feel up to it, check out src/lib/file.slate  
> where the "File Locator" code is to see how it works, particularly  
> String as: File Locator - it is not terribly well-factored but you  
> might at least find it instructive.
>
> I'll also take a look at it and probably wind up doing some  
> extensive cleanups (turning it into, say, File Locator readFrom:  
> PositionableReadStream), but it could take longer. Other (windows)  
> users are welcome to try their skills at it and send in a patch  
> (I'll accept anything that works and isn't too obscure).




More information about the Slate mailing list