[Etoys] SugarDataStore>>getFilename: problem

Bert Freudenberg bert at freudenbergs.de
Tue Dec 30 07:32:10 EST 2008


On 30.12.2008, at 12:50, karl ramberg wrote:

> I had some problems with SugarDatastoreDirectory>>entries by the way.
> Shouldn't it be at:'title' asString only without the changing of back
> slash to forward slash ?


This actually changes any forward slashes to back slashes. Otherwise  
splitting a full path name into its directory and file components  
would get confused. This is done purely so the file names are not only  
the hexadecimal uid, but show some of the entry title, too. When  
retrieving the file contents later, the uid is extracted from that  
embellished file name.

It's an awful hack, but too much code assumes all files are identified  
simply by a string path name with directory separator chars. To  
properly integrate the Journal we might have to separate the actual  
file locator (url, datastore id, or whatever) from its human-readable  
title in all the tools that show files.

- Bert -



More information about the Etoys mailing list