Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

[REBOL] Re: file bug?

From: rotenca:telvia:it at: 9-May-2003 1:52

Hi Gregg
> >>> load mold to-file "[s--a]" > RPT> ** Syntax Error: Invalid email -- %[s--a] > RPT> ** Near: (line 1) %[s--a] > > Hmmm, I think maybe so. It looks like to-file should be quoting the > file name so you get %"[s--a]" - which works by itself - but if you use > it in the context of a path (e.g. %/c/rebol/core/[s--a]), you'd want the > whole path quoted, though it isn't necessary in that case. > > Worth a feedback I'd say. Whatever the case, we need to know how they > suggest we deal with this kind of thing. E.g. do we need to escape all > chars that would break standard REBOL lexical forms.
The problem is that a file name like %[s--a] can be returned by read dir. If I save the name inside a data block, when i try to reload the data, the whole block appears invalid (my block was 600 kb long - sigh). The first solution i see is to transform every filename in a string and the string back to a filename at load time. I think that mold and save should transform: %[s--a] in this molded string: %s%40a so i think that is a mold bug. --- Ciao Romano