[Seaside] The best combination of stuff for SeaSide?

Stephen Pair stephen at pairhome.net
Mon May 19 14:47:29 CEST 2003


Lukas Renggli wrote:

>> This sounds like a platform difference in the way 
>> FileDirectory>>exists works.  What does the following expression give 
>> you (where resourceDir is a FileDirectory on your resources directory).
>>
>>    (FileDirectory on: (resourceDir fullNameFor: '5b.jpeg')) exists
>
>
> It returns true, in a Squeak 3.5-5180 image on Mac OS X.
>
>> There is a test in ModDir>>processHttp that looks to see if there is 
>> a directory that matches the URL...if there is, and there is no 
>> trailing slash, then a redirect is generated to add the trailing 
>> slash.  It looks like you're getting that redirect, which probably 
>> means that the test (FileDirectory>>exists) is answering true, even 
>> when the item is a file and not a directory.
>
>
> Exactly, I put a 'self halt' in there and it does what you are writing.
>
> How might I solve that problem, should I post it as a bug to the 
> Squeak-Mailinglist? I really like to continue using commanche for that 
> kind of stuff? 


Posting it as a bug to the mailing list would be good...that kind of 
thing should work the same across all platforms (either way doesn't 
matter to me).  Also, it would be good to provide an updated version of 
FileDirectoryTests>>testExists that tests this scenario.

In the meantime, you could correct the issue by using the following test:

    ((dir := FileDirectory on: filePath) exists not or:
        [FileStream isAFileNamed: filePath]) ifTrue: [^false].

...of course, this assumes that, on the Mac, #isAFileNamed: will return 
false even if the directory exists.

Let me know if this works and I'll update Comanche with a test similar 
to it and also add a Comanche SUnit test (because no doubt, someone is 
going to change how it works in the future).

- Stephen





>
>
> Cheers
> Lukas
>
> _________________________________________________________________
> MSN Hotmail  -  Absolut kostenfrei! Der weltweit grösste 
> E-Mail-Anbieter im Netz:  http://www.msn.ch/hotmail
>
> _______________________________________________
> Seaside mailing list
> Seaside at lists.squeakfoundation.org
> http://lists.squeakfoundation.org/listinfo/seaside



-- 
- Stephen
_________
Do you need:
  Web/Domain/Application Hosting?
  Mailing List Services?
  IMAP/POP3/Web Email Accounts?
  Instant Messaging Accounts hosted on your domain?

Email me for information.




More information about the Seaside mailing list